about summary refs log tree commit diff
path: root/pkgs/development/haskell-modules
diff options
context:
space:
mode:
authorJohn Ericson <John.Ericson@Obsidian.Systems>2018-01-02 23:39:28 -0500
committerJohn Ericson <John.Ericson@Obsidian.Systems>2018-01-03 01:24:57 -0500
commit5e31e828f88a8aa229d68bade00d9f2d70f7b9f8 (patch)
treef9cec274263c5eb2829c1af85832923d71877d5f /pkgs/development/haskell-modules
parentbc066466fbdd38c1982ea162d01b74d7df88e874 (diff)
downloadnixlib-5e31e828f88a8aa229d68bade00d9f2d70f7b9f8.tar
nixlib-5e31e828f88a8aa229d68bade00d9f2d70f7b9f8.tar.gz
nixlib-5e31e828f88a8aa229d68bade00d9f2d70f7b9f8.tar.bz2
nixlib-5e31e828f88a8aa229d68bade00d9f2d70f7b9f8.tar.lz
nixlib-5e31e828f88a8aa229d68bade00d9f2d70f7b9f8.tar.xz
nixlib-5e31e828f88a8aa229d68bade00d9f2d70f7b9f8.tar.zst
nixlib-5e31e828f88a8aa229d68bade00d9f2d70f7b9f8.zip
ghcWithPackages: Fix cross, and avoid needless C compiler
Diffstat (limited to 'pkgs/development/haskell-modules')
-rw-r--r--pkgs/development/haskell-modules/make-package-set.nix2
-rw-r--r--pkgs/development/haskell-modules/with-packages-wrapper.nix6
2 files changed, 4 insertions, 4 deletions
diff --git a/pkgs/development/haskell-modules/make-package-set.nix b/pkgs/development/haskell-modules/make-package-set.nix
index 448c6e0e4370..968773ded983 100644
--- a/pkgs/development/haskell-modules/make-package-set.nix
+++ b/pkgs/development/haskell-modules/make-package-set.nix
@@ -100,7 +100,7 @@ let
   defaultScope = mkScope self;
   callPackage = drv: args: callPackageWithScope defaultScope drv args;
 
-  withPackages = packages: callPackage ./with-packages-wrapper.nix {
+  withPackages = packages: buildPackages.callPackage ./with-packages-wrapper.nix {
     inherit (self) llvmPackages;
     haskellPackages = self;
     inherit packages;
diff --git a/pkgs/development/haskell-modules/with-packages-wrapper.nix b/pkgs/development/haskell-modules/with-packages-wrapper.nix
index d92201b87673..6b3d6dfd2b0c 100644
--- a/pkgs/development/haskell-modules/with-packages-wrapper.nix
+++ b/pkgs/development/haskell-modules/with-packages-wrapper.nix
@@ -1,4 +1,4 @@
-{ stdenv, lib, ghc, llvmPackages, packages, symlinkJoin, makeWrapper
+{ lib, targetPlatform, ghc, llvmPackages, packages, symlinkJoin, makeWrapper
 , ignoreCollisions ? false, withLLVM ? false
 , postBuild ? ""
 , haskellPackages
@@ -48,7 +48,7 @@ let
   # https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/code-generators.html
   llvm          = lib.makeBinPath
                   ([ llvmPackages.llvm ]
-                   ++ lib.optional stdenv.isDarwin llvmPackages.clang);
+                   ++ lib.optional targetPlatform.isDarwin llvmPackages.clang);
 in
 if paths == [] && !withLLVM then ghc else
 symlinkJoin {
@@ -98,7 +98,7 @@ symlinkJoin {
         makeWrapper ${ghc}/bin/$prg $out/bin/$prg --add-flags "${packageDBFlag}=${packageCfgDir}"
       fi
     done
-  '' + (lib.optionalString stdenv.isDarwin ''
+  '' + (lib.optionalString targetPlatform.isDarwin ''
     # Work around a linker limit in macOS Sierra (see generic-builder.nix):
     local packageConfDir="$out/lib/${ghc.name}/package.conf.d";
     local dynamicLinksDir="$out/lib/links"