diff options
author | sternenseemann <sternenseemann@systemli.org> | 2023-01-04 15:22:29 +0100 |
---|---|---|
committer | sternenseemann <sternenseemann@systemli.org> | 2023-01-04 15:50:28 +0100 |
commit | 066591a35960ddb43652935423ceaacf90536ce8 (patch) | |
tree | 7185e3970ca91f7320ae65801c9096ca373a33bb | |
parent | ff2d74b3294f5c5488ddd1aad2d05fbeb045a7af (diff) | |
download | nixlib-066591a35960ddb43652935423ceaacf90536ce8.tar nixlib-066591a35960ddb43652935423ceaacf90536ce8.tar.gz nixlib-066591a35960ddb43652935423ceaacf90536ce8.tar.bz2 nixlib-066591a35960ddb43652935423ceaacf90536ce8.tar.lz nixlib-066591a35960ddb43652935423ceaacf90536ce8.tar.xz nixlib-066591a35960ddb43652935423ceaacf90536ce8.tar.zst nixlib-066591a35960ddb43652935423ceaacf90536ce8.zip |
haskellPackages.mkDerivation: disable stripping in ghcjs cross set
This line may look odd, but we should not set ghc.isGhcjs if we are using the JavaScript backend. It is a normal cross backend and no special code is required to make it work, i.e. everything will be named as it would be normally. Additionally, passing --ghcjs to Cabal will make it do the wrong thing. We need to, of course, stop strip from being thrown at the JS objects in both cases.
-rw-r--r-- | pkgs/development/haskell-modules/generic-builder.nix | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/pkgs/development/haskell-modules/generic-builder.nix b/pkgs/development/haskell-modules/generic-builder.nix index a723e56c9e17..9bb64bd90298 100644 --- a/pkgs/development/haskell-modules/generic-builder.nix +++ b/pkgs/development/haskell-modules/generic-builder.nix @@ -11,7 +11,12 @@ let in { pname -, dontStrip ? (ghc.isGhcjs or false) +# Note that ghc.isGhcjs != stdenv.hostPlatform.isGhcjs. +# ghc.isGhcjs implies that we are using ghcjs, a project separate from GHC. +# (mere) stdenv.hostPlatform.isGhcjs means that we are using GHC's JavaScript +# backend. The latter is a normal cross compilation backend and needs little +# special accomodation. +, dontStrip ? (ghc.isGhcjs or false || stdenv.hostPlatform.isGhcjs) , version, revision ? null , sha256 ? null , src ? fetchurl { url = "mirror://hackage/${pname}-${version}.tar.gz"; inherit sha256; } |