git.iko.soy/typeable/cabal2nix
on master help sign in
update-hackage-snapshot.sh: update hackage db snapshot nix Nixpkgs
commit7dfce29e873a1e6b1c416a4f3cc3ea4d93386400 authorPeter Simons <simons@cryp.to> dateThu 22 Feb 2018, 15:40 (9 years ago) parentbde1863
1 file changed+19
update-hackage-snapshot.sh+19
update-hackage-snapshot.shnew file+19
@@ -0,0 +1,19 @@
1+#! /usr/bin/env bash
2+
3+set -eu -o pipefail
4+
5+rev=$( git ls-remote --heads git://github.com/commercialhaskell/all-cabal-hashes.git hackage \
6+ | cut -f1
7+ )
8+url="https://github.com/commercialhaskell/all-cabal-hashes/archive/$rev.tar.gz"
9+sha=$( nix-prefetch-url "$url" )
10+
11+sed -e "s|url = .*;|url = \"$url\";|" \
12+ -e "s|sha256 = .*;|sha256 = \"$sha\";|" \
13+ -i nixpkgs/pkgs/data/misc/hackage/default.nix
14+
15+cat <<EOF
16+Verify that the new snapshot actually works:
17+
18+nix-build --no-out-link -E 'with (import ./nixpkgs {}); haskellPackages.callHackage "hsdns" "1.7.1" {}'
19+EOF