From d9591db6f648fecabefb2557cfb3fc4212fe72c6 Mon Sep 17 00:00:00 2001 From: sternenseemann Date: Wed, 4 Jan 2023 15:25:44 +0100 Subject: [PATCH] haskellPackages.mkDerivation: fix shebangs in JS backend binaries The JavaScript backend emits `#!/usr/bin/env node` shebangs we need to take care off using patchShebangs in fixupPhase. --- pkgs/development/haskell-modules/generic-builder.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/development/haskell-modules/generic-builder.nix b/pkgs/development/haskell-modules/generic-builder.nix index 9bb64bd90298..4b7201bb6ac9 100644 --- a/pkgs/development/haskell-modules/generic-builder.nix +++ b/pkgs/development/haskell-modules/generic-builder.nix @@ -324,7 +324,9 @@ stdenv.mkDerivation ({ inherit src; inherit depsBuildBuild nativeBuildInputs; - buildInputs = otherBuildInputs ++ optionals (!isLibrary) propagatedBuildInputs; + buildInputs = otherBuildInputs ++ optionals (!isLibrary) propagatedBuildInputs + # For patchShebangsAuto in fixupPhase + ++ optionals stdenv.hostPlatform.isGhcjs [ nodejs ]; propagatedBuildInputs = optionals isLibrary propagatedBuildInputs; LANG = "en_US.UTF-8"; # GHC needs the locale configured during the Haddock phase.