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";
};
}
The function "callHackage <name> <version>" generates build instructions for
the requested library version on-the-fly. All of Hackage is available. Note:
this code is brand-new, experimental, and it might change in the future. Don't
base production code on this feature yet.
Example usage:
$ nix-shell -p 'haskellPackages.callHackage "cpphs" "1.19.3" {}' --run "cpphs --version"
cpphs 1.19.3
$ nix-shell -p 'haskellPackages.ghcWithPackages (self: [(self.callHackage "hsdns" "1.6.1" {})])' --run "ghc-pkg list hsdns"
/nix/store/p6r81k2vb2pzy4wcvri6z9m492i0hg63-ghc-8.0.1/lib/ghc-8.0.1/package.conf.d
hsdns-1.6.1
These functions used to live in pkgs/development/haskell-modules/default.nix,
but they are generic, really, and should be easily accessible to everyone.
This update was generated by hackage2nix v20150903-82-g351b6f8 using the following inputs:
- Hackage: af161fdf17
- LTS Haskell: da73308b63
- Stackage Nightly: 1994a4f865
This seems to have been confusing people, using both xlibs and xorg, etc.
- Avoided renaming local (and different) xlibs binding in gcc*.
- Fixed cases where both xorg and xlibs were used.
Hopefully everything still works as before.
With this patch applied, "nix-env -qaP -A haskellngPackages" succeeds fine
without running out of memory. Thanks to @bennofs for catching this in
bbb422af92 (commitcomment-11235596).
Build environments created by overrideScope lost the ability to find
packages outside of the Haskell package set without help. This patch
remedies this issue.
Fixes https://github.com/NixOS/nixpkgs/issues/6192.
This makes the attribute (a) consistent with "doCheck" and friends and (b)
avoids the double negation "noHaddock = false" meaning "doHaddock = true".
Fixes https://github.com/NixOS/cabal2nix/issues/63.
deepOverride turns out to be completely unfeasible for non-trivial overrides.
Nix evaluates for an eternity, and then comes back saying:
Too many heap sections: Increase MAXHINCR or MAX_HEAP_SECTS
nix-instantiate killed by signal 6
The hand-written deep-override, on the other hand, performs the job in a
fraction of a second, no problem.
All bow to Russell O'Connor!