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 {
inherit (self) llvmPackages;
haskellPackages = self;
inherit packages;
};

View file

@ -1,7 +1,6 @@
{ lib, targetPlatform, ghc, llvmPackages, packages, symlinkJoin, makeWrapper
, ignoreCollisions ? false, withLLVM ? false
, withLLVM ? false
, postBuild ? ""
, haskellPackages
, ghcLibdir ? null # only used by ghcjs, when resolving plugins
}:
@ -45,7 +44,7 @@ let
paths = lib.filter (x: x ? isHaskellLibrary) (lib.closePropagation packages);
hasLibraries = lib.any (x: x.isHaskellLibrary) paths;
# 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
([ llvmPackages.llvm ]
++ lib.optional targetPlatform.isDarwin llvmPackages.clang);
@ -58,7 +57,6 @@ symlinkJoin {
name = ghc.name + "-with-packages";
paths = paths ++ [ghc];
extraOutputsToInstall = [ "out" "doc" ];
inherit ignoreCollisions;
postBuild = ''
. ${makeWrapper}/nix-support/setup-hook
@ -132,6 +130,5 @@ symlinkJoin {
passthru = {
preferLocalBuild = true;
inherit (ghc) version meta;
inherit haskellPackages;
};
}