From f344d8ba41646d61c5d8c99379b65ffd2a8b655c Mon Sep 17 00:00:00 2001 From: Stig Palmquist Date: Sun, 25 Jul 2021 04:10:33 +0200 Subject: [PATCH] perlPackages.SQLTranslator: fix scripts shebang (cherry picked from commit cc4f71d619ddf6d33da203af3881da9a28b5421e) --- pkgs/top-level/perl-packages.nix | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/pkgs/top-level/perl-packages.nix b/pkgs/top-level/perl-packages.nix index 9bf212761a9..7b9f074085a 100644 --- a/pkgs/top-level/perl-packages.nix +++ b/pkgs/top-level/perl-packages.nix @@ -18804,6 +18804,18 @@ let }; buildInputs = [ FileShareDirInstall JSONMaybeXS TestDifferences TestException XMLWriter YAML ]; propagatedBuildInputs = [ CarpClan DBI FileShareDir Moo PackageVariant ParseRecDescent TryTiny ]; + + postPatch = '' + patchShebangs script + ''; + + nativeBuildInputs = lib.optional stdenv.isDarwin shortenPerlShebang; + postInstall = lib.optionalString stdenv.isDarwin '' + for file in $out/bin/*; do + shortenPerlShebang $file + done + ''; + meta = { description = "SQL DDL transformations and more"; license = with lib.licenses; [ artistic1 gpl1Plus ];