Merge pull request #33433 from obsidiansystems/haskell-misc
ghcWithPackages: Misc cleanups
This commit is contained in:
commit
be49066415
@ -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;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -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;
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user