mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-28 09:53:10 +00:00
Merge pull request #70192 from obsidiansystems/call-hackage-cross
haskell: Speed up cross callHackage by using native source
This commit is contained in:
commit
31714a442d
@ -122,9 +122,9 @@ let
|
||||
haskellSrc2nix = { name, src, sha256 ? null, extraCabal2nixOptions ? "" }:
|
||||
let
|
||||
sha256Arg = if sha256 == null then "--sha256=" else ''--sha256="${sha256}"'';
|
||||
in pkgs.buildPackages.stdenv.mkDerivation {
|
||||
in buildPackages.stdenv.mkDerivation {
|
||||
name = "cabal2nix-${name}";
|
||||
nativeBuildInputs = [ pkgs.buildPackages.cabal2nix ];
|
||||
nativeBuildInputs = [ buildPackages.cabal2nix ];
|
||||
preferLocalBuild = true;
|
||||
allowSubstitutes = false;
|
||||
phases = ["installPhase"];
|
||||
@ -137,7 +137,7 @@ let
|
||||
'';
|
||||
};
|
||||
|
||||
all-cabal-hashes-component = name: version: pkgs.runCommand "all-cabal-hashes-component-${name}-${version}" {} ''
|
||||
all-cabal-hashes-component = name: version: buildPackages.runCommand "all-cabal-hashes-component-${name}-${version}" {} ''
|
||||
tar --wildcards -xzvf ${all-cabal-hashes} \*/${name}/${version}/${name}.{json,cabal}
|
||||
mkdir -p $out
|
||||
mv */${name}/${version}/${name}.{json,cabal} $out
|
||||
|
Loading…
Reference in New Issue
Block a user