From d6479240ca003cb767d51e32c595d18e0781be85 Mon Sep 17 00:00:00 2001 From: tyxieblub <5111464+tyxieblub@users.noreply.github.com> Date: Fri, 19 Apr 2024 14:41:15 +0200 Subject: [PATCH] shelldap: fix on darwin using shortenPerlShebang --- pkgs/tools/misc/shelldap/default.nix | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/pkgs/tools/misc/shelldap/default.nix b/pkgs/tools/misc/shelldap/default.nix index 045c5732c3e0..09901368c870 100644 --- a/pkgs/tools/misc/shelldap/default.nix +++ b/pkgs/tools/misc/shelldap/default.nix @@ -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