lib.newScope: allow overriding callPackage

This commit is contained in:
quantenzitrone 2026-03-17 16:24:10 +01:00
commit f08c835bf9
No known key found for this signature in database
2 changed files with 6 additions and 3 deletions

View file

@ -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;
};

View file

@ -56,7 +56,7 @@ makeScope newScope (
in
{
inherit callPackage buildOctavePackage computeRequiredOctavePackages;
inherit buildOctavePackage computeRequiredOctavePackages;
inherit (callPackage ../development/interpreters/octave/hooks { })
writeRequiredOctavePackagesHook