wakeonlan: fix Perl shebangs on darwin

Fixes #225024
This commit is contained in:
Jakub Okoński 2023-05-06 23:52:27 +02:00
parent 81f5131292
commit 660ea29885
No known key found for this signature in database

View file

@ -1,4 +1,4 @@
{ lib, perlPackages, fetchFromGitHub, installShellFiles }:
{ lib, stdenv, perlPackages, fetchFromGitHub, installShellFiles, shortenPerlShebang }:
perlPackages.buildPerlPackage rec {
pname = "wakeonlan";
@ -13,7 +13,7 @@ perlPackages.buildPerlPackage rec {
outputs = [ "out" ];
nativeBuildInputs = [ installShellFiles ];
nativeBuildInputs = [ installShellFiles ] ++ lib.optional stdenv.isDarwin shortenPerlShebang;
nativeCheckInputs = [ perlPackages.TestPerlCritic perlPackages.TestPod perlPackages.TestPodCoverage ];
# Linting and formatting checks are of no interest for us.
@ -24,6 +24,8 @@ perlPackages.buildPerlPackage rec {
installPhase = ''
install -Dt $out/bin wakeonlan
installManPage blib/man1/wakeonlan.1
'' + lib.optionalString stdenv.isDarwin ''
shortenPerlShebang $out/bin/wakeonlan
'';
meta = with lib; {