diff options
author | Alyssa Ross <hi@alyssa.is> | 2021-01-26 18:06:19 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2021-01-26 18:21:18 +0000 |
commit | 7ac6743433dd45ceaead2ca96f6356dc0d064ce6 (patch) | |
tree | b68ec89d7d2a8d2b6e6b1ff94ba26d6af4096350 /nixpkgs/pkgs/development/haskell-modules/make-package-set.nix | |
parent | c5c7451dbef37b51f52792d6395a670ef5183d27 (diff) | |
parent | 891f607d5301d6730cb1f9dcf3618bcb1ab7f10e (diff) | |
download | nixlib-7ac6743433dd45ceaead2ca96f6356dc0d064ce6.tar nixlib-7ac6743433dd45ceaead2ca96f6356dc0d064ce6.tar.gz nixlib-7ac6743433dd45ceaead2ca96f6356dc0d064ce6.tar.bz2 nixlib-7ac6743433dd45ceaead2ca96f6356dc0d064ce6.tar.lz nixlib-7ac6743433dd45ceaead2ca96f6356dc0d064ce6.tar.xz nixlib-7ac6743433dd45ceaead2ca96f6356dc0d064ce6.tar.zst nixlib-7ac6743433dd45ceaead2ca96f6356dc0d064ce6.zip |
Merge commit '891f607d5301d6730cb1f9dcf3618bcb1ab7f10e'
Diffstat (limited to 'nixpkgs/pkgs/development/haskell-modules/make-package-set.nix')
-rw-r--r-- | nixpkgs/pkgs/development/haskell-modules/make-package-set.nix | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/nixpkgs/pkgs/development/haskell-modules/make-package-set.nix b/nixpkgs/pkgs/development/haskell-modules/make-package-set.nix index 4ae3f0b2427f..28b48bfcbc4a 100644 --- a/nixpkgs/pkgs/development/haskell-modules/make-package-set.nix +++ b/nixpkgs/pkgs/development/haskell-modules/make-package-set.nix @@ -11,9 +11,13 @@ , # package-set used for non-haskell dependencies (all of nixpkgs) pkgs -, # stdenv to use for building haskell packages +, # stdenv provides our build and host platforms stdenv +, # this module provides the list of known licenses and maintainers + lib + + # needed for overrideCabal & packageSourceOverrides , haskellLib , # hashes for downloading Hackage packages @@ -22,7 +26,7 @@ , # compiler to use ghc -, # A function that takes `{ pkgs, stdenv, callPackage }` as the first arg and +, # A function that takes `{ pkgs, lib, callPackage }` as the first arg and # `self` as second, and returns a set of haskell packages package-set @@ -37,7 +41,7 @@ self: let inherit (stdenv) buildPlatform hostPlatform; - inherit (stdenv.lib) fix' extends makeOverridable; + inherit (lib) fix' extends makeOverridable; inherit (haskellLib) overrideCabal; mkDerivationImpl = pkgs.callPackage ./generic-builder.nix { @@ -80,8 +84,8 @@ let # lost on `.override`) but determine the auto-args based on `drv` (the problem here # is that nix has no way to "passthrough" args while preserving the reflection # info that callPackage uses to determine the arguments). - drv = if stdenv.lib.isFunction fn then fn else import fn; - auto = builtins.intersectAttrs (stdenv.lib.functionArgs drv) scope; + drv = if lib.isFunction fn then fn else import fn; + auto = builtins.intersectAttrs (lib.functionArgs drv) scope; # this wraps the `drv` function to add a `overrideScope` function to the result. drvScope = allArgs: drv allArgs // { @@ -94,7 +98,7 @@ let # nothing. in callPackageWithScope newScope drv manualArgs; }; - in stdenv.lib.makeOverridable drvScope (auto // manualArgs); + in lib.makeOverridable drvScope (auto // manualArgs); mkScope = scope: let ps = pkgs.__splicedPackages; @@ -169,7 +173,7 @@ let }; }); -in package-set { inherit pkgs stdenv callPackage; } self // { +in package-set { inherit pkgs lib callPackage; } self // { inherit mkDerivation callPackage haskellSrc2nix hackage2nix buildHaskellPackages; |