about summary refs log tree commit diff
path: root/pkgs/tools/misc/shelldap/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/tools/misc/shelldap/default.nix')
-rw-r--r--pkgs/tools/misc/shelldap/default.nix10
1 files changed, 9 insertions, 1 deletions
diff --git a/pkgs/tools/misc/shelldap/default.nix b/pkgs/tools/misc/shelldap/default.nix
index 045c5732c3e09..09901368c8701 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