about summary refs log tree commit diff
path: root/pkgs/data
diff options
context:
space:
mode:
authorPeter Simons <simons@cryp.to>2016-11-01 18:29:43 +0100
committerPeter Simons <simons@cryp.to>2016-11-01 18:35:19 +0100
commitfac1168816a132694a3f21f2e00654f69ab44e5f (patch)
tree040297c6028957288e9d6cbd66a8bd9df3c9e5db /pkgs/data
parent0607fa18740f1c41b522c43f4f2422888354a901 (diff)
callHackage: make 'all-cabal-hashes' repository overridable
This commit changes callHackage to use a deterministic version of the Hackage
checkout from https://github.com/commercialhaskell/all-cabal-hashes by default.
This means that packages uploaded to Hackage after today will be available to
callHackage only after "pkgs/data/misc/hackage/default.nix" has been updated.

People who want the previous behavior where we always had the latest version of
Hackage available -- at the cost of frequent downloads from Github --, can add
the following override to their "~/.nixpkgs/config.nix" file:

  {
    packageOverrides = super: {
      all-cabal-hashes = builtins.fetchTarball "https://github.com/commercialhaskell/all-cabal-hashes/archive/hackage.tar.gz";
    };
  }
Diffstat (limited to 'pkgs/data')
-rw-r--r--pkgs/data/misc/hackage/default.nix11
1 files changed, 11 insertions, 0 deletions
diff --git a/pkgs/data/misc/hackage/default.nix b/pkgs/data/misc/hackage/default.nix
new file mode 100644
index 0000000000000..812362d6b30cb
--- /dev/null
+++ b/pkgs/data/misc/hackage/default.nix
@@ -0,0 +1,11 @@
+{ fetchFromGitHub }:
+
+# Use builtins.fetchTarball "https://github.com/commercialhaskell/all-cabal-hashes/archive/hackage.tar.gz"
+# instead if you want the latest Hackage automatically at the price of frequent re-downloads.
+
+fetchFromGitHub {
+  owner = "commercialhaskell";
+  repo = "all-cabal-hashes";
+  rev = "ee101d34ff8bd59897aa2eb0a124bcd3fb47ceec";
+  sha256 = "1hky0s2c1rv1srfnhbyi3ny14rnfnnp2j9fsr4ylz76xyxgjf5wm";
+}