Merge pull request #305317 from tyxieblub/shelldap-darwin

shelldap: fix on darwin using shortenPerlShebang
This commit is contained in:
Weijia Wang 2024-04-22 05:21:53 +02:00 committed by GitHub
commit df51f2293e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 9 additions and 1 deletions

View File

@ -1,6 +1,8 @@
{ lib
, stdenv
, fetchFromGitHub
, perlPackages
, shortenPerlShebang
}:
perlPackages.buildPerlPackage rec {
@ -26,6 +28,8 @@ perlPackages.buildPerlPackage rec {
YAMLSyck
];
nativeBuildInputs = lib.optional stdenv.isDarwin shortenPerlShebang;
prePatch = ''
touch Makefile.PL
'';
@ -33,7 +37,11 @@ perlPackages.buildPerlPackage rec {
installPhase = ''
runHook preInstall
install -Dm555 -t $out/bin shelldap
runHook preInstall
runHook postInstall
'';
postInstall = lib.optionalString stdenv.isDarwin ''
shortenPerlShebang $out/bin/shelldap
'';
# no make target 'test', not tests provided by source