git.iko.soy/typeable/nixpkgs
on master help sign in
haskell: add support for all of Hackage

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

commit2862d272a606c6188c4c33dab60de4e0066ee194 authorPeter Simons <simons@cryp.to> dateSat 11 Jun 2016, 19:21 (10 years ago) parent52aad6c
1 file changed+4
pkgs/development/haskell-modules/default.nix+4
pkgs/development/haskell-modules/default.nix+4
@@ -8,6 +8,8 @@ let
88
99 inherit (stdenv.lib) fix' extends;
1010
11+ inherit (import ./lib.nix { inherit pkgs; }) hackage2nix;
12+
1113 haskellPackages = self:
1214 let
1315
@@ -57,6 +59,8 @@ let
5759
5860 inherit mkDerivation callPackage;
5961
62+ callHackage = name: version: self.callPackage (hackage2nix name version);
63+
6064 ghcWithPackages = selectFrom: withPackages (selectFrom self);
6165
6266 ghcWithHoogle = selectFrom: