Merge pull request #24591 from shlevy/haskell-export-2nix

haskellPackages: Export haskellSrc2nix and hackage2nix
This commit is contained in:
Peter Simons 2017-04-03 14:23:34 +02:00 committed by GitHub
commit 04e3cf8005

View File

@ -80,12 +80,12 @@ let
in in
import ./hackage-packages.nix { inherit pkgs stdenv callPackage; } self // { 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. # 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); ghcWithPackages = selectFrom: withPackages (selectFrom self);