Created
July 19, 2019 11:02
-
-
Save yorickvP/3526c8b60de0c923cb11d1a20e975c18 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let | |
all-cabal-hashes-component = name: version: type: | |
builtins.fetchurl | |
"https://raw.githubusercontent.com/commercialhaskell/all-cabal-hashes/hackage/${name}/${version}/${name}.${type}"; | |
in self: super: { | |
haskellPackages = super.haskellPackages.override { | |
overrides = self: super: { | |
hackage2nix = name: version: | |
self.haskellSrc2nix { | |
name = "${name}-${version}"; | |
sha256 = '' | |
$(sed -e 's/.*"SHA256":"//' -e 's/".*$//' "${ | |
all-cabal-hashes-component name version "json" | |
}")''; | |
src = all-cabal-hashes-component name version "cabal"; | |
}; | |
}; | |
}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment