Merge pull request #33433 from obsidiansystems/haskell-misc

ghcWithPackages: Misc cleanups
This commit is contained in:
Peter Simons 2018-01-05 09:28:07 +01:00 committed by GitHub
commit be49066415
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 6 deletions

View File

@ -102,7 +102,6 @@ let
withPackages = packages: buildPackages.callPackage ./with-packages-wrapper.nix { withPackages = packages: buildPackages.callPackage ./with-packages-wrapper.nix {
inherit (self) llvmPackages; inherit (self) llvmPackages;
haskellPackages = self;
inherit packages; inherit packages;
}; };

View File

@ -1,7 +1,6 @@
{ lib, targetPlatform, ghc, llvmPackages, packages, symlinkJoin, makeWrapper { lib, targetPlatform, ghc, llvmPackages, packages, symlinkJoin, makeWrapper
, ignoreCollisions ? false, withLLVM ? false , withLLVM ? false
, postBuild ? "" , postBuild ? ""
, haskellPackages
, ghcLibdir ? null # only used by ghcjs, when resolving plugins , ghcLibdir ? null # only used by ghcjs, when resolving plugins
}: }:
@ -45,7 +44,7 @@ let
paths = lib.filter (x: x ? isHaskellLibrary) (lib.closePropagation packages); paths = lib.filter (x: x ? isHaskellLibrary) (lib.closePropagation packages);
hasLibraries = lib.any (x: x.isHaskellLibrary) paths; hasLibraries = lib.any (x: x.isHaskellLibrary) paths;
# CLang is needed on Darwin for -fllvm to work: # CLang is needed on Darwin for -fllvm to work:
# https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/code-generators.html # https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/codegens.html#llvm-code-generator-fllvm
llvm = lib.makeBinPath llvm = lib.makeBinPath
([ llvmPackages.llvm ] ([ llvmPackages.llvm ]
++ lib.optional targetPlatform.isDarwin llvmPackages.clang); ++ lib.optional targetPlatform.isDarwin llvmPackages.clang);
@ -58,7 +57,6 @@ symlinkJoin {
name = ghc.name + "-with-packages"; name = ghc.name + "-with-packages";
paths = paths ++ [ghc]; paths = paths ++ [ghc];
extraOutputsToInstall = [ "out" "doc" ]; extraOutputsToInstall = [ "out" "doc" ];
inherit ignoreCollisions;
postBuild = '' postBuild = ''
. ${makeWrapper}/nix-support/setup-hook . ${makeWrapper}/nix-support/setup-hook
@ -132,6 +130,5 @@ symlinkJoin {
passthru = { passthru = {
preferLocalBuild = true; preferLocalBuild = true;
inherit (ghc) version meta; inherit (ghc) version meta;
inherit haskellPackages;
}; };
} }