mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-21 13:10:33 +00:00
Merge pull request #36652 from roberth/cabal2nix-extra-options
haskell.lib.haskellSrc2nix: add extraCabal2nixOptions
This commit is contained in:
commit
90b394936b
|
@ -107,7 +107,7 @@ let
|
|||
inherit packages;
|
||||
};
|
||||
|
||||
haskellSrc2nix = { name, src, sha256 ? null }:
|
||||
haskellSrc2nix = { name, src, sha256 ? null, extraCabal2nixOptions ? "" }:
|
||||
let
|
||||
sha256Arg = if isNull sha256 then "--sha256=" else ''--sha256="${sha256}"'';
|
||||
in pkgs.buildPackages.stdenv.mkDerivation {
|
||||
|
@ -120,7 +120,7 @@ let
|
|||
installPhase = ''
|
||||
export HOME="$TMP"
|
||||
mkdir -p "$out"
|
||||
cabal2nix --compiler=${ghc.haskellCompilerName} --system=${stdenv.system} ${sha256Arg} "${src}" > "$out/default.nix"
|
||||
cabal2nix --compiler=${ghc.haskellCompilerName} --system=${stdenv.system} ${sha256Arg} "${src}" ${extraCabal2nixOptions} > "$out/default.nix"
|
||||
'';
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue