haskellPackages: Export haskellSrc2nix and hackage2nix

Allows using a different haskell package set to generate the nix
expressions (during eval time) than the one used to actually build the
package (at build time).
This commit is contained in:
Shea Levy 2017-04-03 07:55:49 -04:00
parent e9a636648c
commit 1feca4cae3

View File

@ -80,12 +80,12 @@ let
in
import ./hackage-packages.nix { inherit pkgs stdenv callPackage; } self // {
inherit mkDerivation callPackage;
inherit mkDerivation callPackage haskellSrc2nix hackage2nix;
callHackage = name: version: self.callPackage (hackage2nix name version);
callHackage = name: version: self.callPackage (self.hackage2nix name version);
# Creates a Haskell package from a source package by calling cabal2nix on the source.
callCabal2nix = name: src: self.callPackage (haskellSrc2nix { inherit src name; });
callCabal2nix = name: src: self.callPackage (self.haskellSrc2nix { inherit src name; });
ghcWithPackages = selectFrom: withPackages (selectFrom self);