on iko/ghcjs-patch-master help sign in
Remove propagatedBuildInputs from ghc (#1318)
commit01db3823b4dbaa9cf4e2182701f82184813befb1 authorCheng Shao <astrohavoc@gmail.com> dateWed 5 Jan 2022, 01:09 (5 years ago) parent11284e3
3 files changed+6−10
compiler/ghc/configured-src.nix+3−3 compiler/ghc/default.nix−3 lib/ghcjs-project.nix+3−4
compiler/ghc/configured-src.nix+3−3
@@ -33,9 +33,6 @@ stdenv.mkDerivation (rec {
3333
3434 buildInputs = [ perl bash ] ++ (libDeps hostPlatform);
3535
36− propagatedBuildInputs = [ targetPackages.stdenv.cc ]
37− ++ lib.optional useLLVM llvmPackages.llvm;
38−
3936 depsTargetTarget = map lib.getDev (libDeps targetPlatform);
4037 depsTargetTargetPropagated = map (lib.getOutput "out") (libDeps targetPlatform);
4138
@@ -65,6 +62,9 @@ stdenv.mkDerivation (rec {
6562
6663 echo -n "${buildMK}" > mk/build.mk
6764 sed -i -e 's|-isysroot /Developer/SDKs/MacOSX10.5.sdk||' configure
65+ '' + lib.optionalString useLLVM ''
66+ export LLC="${llvmPackages.llvm}/bin/llc"
67+ export OPT="${llvmPackages.llvm}/bin/opt"
6868 '' + lib.optionalString (!stdenv.isDarwin) ''
6969 export NIX_LDFLAGS+=" -rpath $out/lib/${targetPrefix}ghc-${version}"
7070 '' + lib.optionalString stdenv.isDarwin ''
compiler/ghc/default.nix−3
@@ -234,9 +234,6 @@ stdenv.mkDerivation (rec {
234234
235235 buildInputs = [ perl bash ] ++ (libDeps hostPlatform);
236236
237− propagatedBuildInputs = [ targetPackages.stdenv.cc ]
238− ++ lib.optional useLLVM llvmPackages.llvm;
239−
240237 depsTargetTarget = map lib.getDev (libDeps targetPlatform);
241238 depsTargetTargetPropagated = map (lib.getOutput "out") (libDeps targetPlatform);
242239
lib/ghcjs-project.nix+3−4
@@ -76,7 +76,7 @@ let
7676 # Inputs needed to boot the GHCJS compiler
7777 bootInputs = with pkgs.buildPackages; [
7878 # pin nodejs to the 12 series for now, as strings can only be half the length in node 14+
79− # see https://github.com/nodejs/node/issues/33960, this can break large TH splices for now.
79+ # see https://github.com/nodejs/node/issues/33960, this can break large TH splices for now.
8080 nodejs-12_x
8181 makeWrapper
8282 xorg.lndir
@@ -85,7 +85,7 @@ let
8585 ]
8686 ++ [ ghc cabal-install emsdk ];
8787 # Configured the GHCJS source
88− configured-src = pkgs.runCommand "configured-ghcjs-src" {
88+ configured-src = pkgs.runCommandCC "configured-ghcjs-src" {
8989 buildInputs = configureInputs;
9090 inherit src;
9191 } ''
@@ -132,7 +132,7 @@ let
132132 # see https://github.com/ghcjs/ghcjs/issues/751 for the happy upper bound.
133133
134134 ghcjsProject = pkgs.haskell-nix.cabalProject' (
135− (pkgs.lib.filterAttrs
135+ (pkgs.lib.filterAttrs
136136 (n: _: !(builtins.any (x: x == n)
137137 ["src" "ghcjsVersion" "ghcVersion" "happy" "alex" "cabal-install"])) args) // {
138138 src = configured-src;
@@ -187,4 +187,3 @@ in ghcjsProject // {
187187 };
188188 inherit configureInputs bootInputs configured-src emscriptenupstream emscripten emsdk;
189189}
190−