2023-05-24 13:37:59 +00:00
|
|
|
{ lib, stdenv, perlPackages, fetchFromGitHub, installShellFiles, shortenPerlShebang }:
|
2021-02-16 17:04:54 +00:00
|
|
|
|
|
|
|
perlPackages.buildPerlPackage rec {
|
|
|
|
pname = "wakeonlan";
|
2022-07-14 12:49:19 +00:00
|
|
|
version = "0.42";
|
2021-02-16 17:04:54 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "jpoliv";
|
|
|
|
repo = pname;
|
2022-07-14 12:49:19 +00:00
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "sha256-zCOpp5iNrWwh2knBGWhiEyG9IPAnFRwH5jJLEVLBISM=";
|
2021-02-16 17:04:54 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
outputs = [ "out" ];
|
|
|
|
|
2024-09-26 11:04:55 +00:00
|
|
|
nativeBuildInputs = [ installShellFiles ] ++ lib.optional stdenv.hostPlatform.isDarwin shortenPerlShebang;
|
2022-07-18 16:21:45 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [ perlPackages.TestPerlCritic perlPackages.TestPod perlPackages.TestPodCoverage ];
|
2022-07-18 16:21:45 +00:00
|
|
|
# Linting and formatting checks are of no interest for us.
|
|
|
|
preCheck = ''
|
|
|
|
rm -f t/93_pod_spell.t
|
|
|
|
'';
|
2021-02-16 17:04:54 +00:00
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
install -Dt $out/bin wakeonlan
|
|
|
|
installManPage blib/man1/wakeonlan.1
|
2024-09-26 11:04:55 +00:00
|
|
|
'' + lib.optionalString stdenv.hostPlatform.isDarwin ''
|
2023-05-24 13:37:59 +00:00
|
|
|
shortenPerlShebang $out/bin/wakeonlan
|
2021-02-16 17:04:54 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Perl script for waking up computers via Wake-On-LAN magic packets";
|
|
|
|
homepage = "https://github.com/jpoliv/wakeonlan";
|
|
|
|
license = licenses.artistic1;
|
|
|
|
maintainers = with maintainers; [ SuperSandro2000 ];
|
2024-02-29 20:09:43 +00:00
|
|
|
mainProgram = "wakeonlan";
|
2021-02-16 17:04:54 +00:00
|
|
|
};
|
|
|
|
}
|