mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-27 05:43:50 +03:00
pkgs/development/haskell-modules: simplify use of standard fix' and extends functions
My original version of 'extend' had its arguments flipped compared to the one we now have in stdenv.lib.
This commit is contained in:
parent
89a5717c7a
commit
69add60b5c
@ -6,9 +6,7 @@
|
|||||||
|
|
||||||
let
|
let
|
||||||
|
|
||||||
fix = stdenv.lib.fix';
|
inherit (stdenv.lib) fix' extends;
|
||||||
|
|
||||||
extend = stdenv.lib.flip stdenv.lib.extends;
|
|
||||||
|
|
||||||
haskellPackages = self:
|
haskellPackages = self:
|
||||||
let
|
let
|
||||||
@ -41,7 +39,7 @@ let
|
|||||||
});
|
});
|
||||||
|
|
||||||
callPackageWithScope = scope: drv: args: (stdenv.lib.callPackageWith scope drv args) // {
|
callPackageWithScope = scope: drv: args: (stdenv.lib.callPackageWith scope drv args) // {
|
||||||
overrideScope = f: callPackageWithScope (mkScope (fix (extend scope.__unfix__ f))) drv args;
|
overrideScope = f: callPackageWithScope (mkScope (fix' (extends f scope.__unfix__))) drv args;
|
||||||
};
|
};
|
||||||
|
|
||||||
mkScope = scope: pkgs // pkgs.xorg // pkgs.gnome // scope;
|
mkScope = scope: pkgs // pkgs.xorg // pkgs.gnome // scope;
|
||||||
@ -78,4 +76,8 @@ let
|
|||||||
|
|
||||||
in
|
in
|
||||||
|
|
||||||
fix (extend (extend (extend (extend haskellPackages commonConfiguration) compilerConfig) packageSetConfig) overrides)
|
fix'
|
||||||
|
(extends overrides
|
||||||
|
(extends packageSetConfig
|
||||||
|
(extends compilerConfig
|
||||||
|
(extends commonConfiguration haskellPackages))))
|
||||||
|
Loading…
Reference in New Issue
Block a user