Partition all-cabal-hashes into case-insensitive-safe components.
OS X by default has a case-insensitive filesystem, and fetching all-cabal-hashes there fails due to a hash mismatch caused by package pairs like compactable and Compactable. This partitions the package set such that each partition contains no equivalent-up-to-case pairs.
This commit is contained in:
@@ -118,10 +118,23 @@ let
|
||||
'';
|
||||
};
|
||||
|
||||
hackage2nix = name: version: self.haskellSrc2nix {
|
||||
all-cabal-hashes-component = name: import (pkgs.runCommand "all-cabal-hashes-component-${name}.nix" {}
|
||||
''
|
||||
set +o pipefail
|
||||
for component in ${all-cabal-hashes}/*; do
|
||||
if ls $component | grep -q ${name}; then
|
||||
echo "builtins.storePath $component" > $out
|
||||
exit 0
|
||||
fi
|
||||
done
|
||||
echo "${name} not found in any all-cabal-hashes component, are you sure it's in hackage?" >&2
|
||||
exit 1
|
||||
'');
|
||||
|
||||
hackage2nix = name: version: let component = all-cabal-hashes-component name; in self.haskellSrc2nix {
|
||||
name = "${name}-${version}";
|
||||
sha256 = ''$(sed -e 's/.*"SHA256":"//' -e 's/".*$//' "${all-cabal-hashes}/${name}/${version}/${name}.json")'';
|
||||
src = "${all-cabal-hashes}/${name}/${version}/${name}.cabal";
|
||||
sha256 = ''$(sed -e 's/.*"SHA256":"//' -e 's/".*$//' "${component}/${name}/${version}/${name}.json")'';
|
||||
src = "${component}/${name}/${version}/${name}.cabal";
|
||||
};
|
||||
|
||||
in package-set { inherit pkgs stdenv callPackage; } self // {
|
||||
|
||||
Reference in New Issue
Block a user