mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-07-06 17:13:24 -05:00
lib.newScope: allow overriding callPackage
This commit is contained in:
parent
784d11dcb7
commit
f08c835bf9
2 changed files with 6 additions and 3 deletions
|
|
@ -631,9 +631,12 @@ rec {
|
|||
makeScope =
|
||||
newScope: f:
|
||||
let
|
||||
self = f self // {
|
||||
newScope = scope: newScope (self // scope);
|
||||
self = {
|
||||
callPackage = self.newScope { };
|
||||
}
|
||||
// f self
|
||||
// {
|
||||
newScope = scope: newScope (self // scope);
|
||||
overrideScope = g: makeScope newScope (extends g f);
|
||||
packages = f;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ makeScope newScope (
|
|||
in
|
||||
{
|
||||
|
||||
inherit callPackage buildOctavePackage computeRequiredOctavePackages;
|
||||
inherit buildOctavePackage computeRequiredOctavePackages;
|
||||
|
||||
inherit (callPackage ../development/interpreters/octave/hooks { })
|
||||
writeRequiredOctavePackagesHook
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue