From 066591a35960ddb43652935423ceaacf90536ce8 Mon Sep 17 00:00:00 2001 From: sternenseemann Date: Wed, 4 Jan 2023 15:22:29 +0100 Subject: 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. --- pkgs/development/haskell-modules/generic-builder.nix | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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; } -- cgit 1.4.1