tests.nixpkgs-check-by-name: Add test for alternate callPackage's
Tests that alternate callPackage's don't give an error, so pkgs/by-name is only required for pkgs.callPackage itself
This commit is contained in:
parent
d659d5f8ac
commit
be26d74840
4 changed files with 20 additions and 1 deletions
|
@ -30,7 +30,9 @@ let
|
|||
# The base fixed-point function to populate the resulting attribute set
|
||||
pkgsFun = self: {
|
||||
inherit lib;
|
||||
callPackage = lib.callPackageWith self;
|
||||
newScope = extra: lib.callPackageWith (self // extra);
|
||||
callPackage = self.newScope { };
|
||||
callPackages = lib.callPackagesWith self;
|
||||
someDrv = { type = "derivation"; };
|
||||
};
|
||||
|
||||
|
|
|
@ -0,0 +1,16 @@
|
|||
self: super: {
|
||||
alternateCallPackage = self.myScope.callPackage ({ myScopeValue, someDrv }:
|
||||
assert myScopeValue;
|
||||
someDrv
|
||||
) { };
|
||||
|
||||
myScope = self.lib.makeScope self.newScope (self: {
|
||||
myScopeValue = true;
|
||||
});
|
||||
|
||||
myPackages = self.callPackages ({ someDrv }: {
|
||||
a = someDrv;
|
||||
b = someDrv;
|
||||
}) { };
|
||||
inherit (self.myPackages) a b;
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
import ../mock-nixpkgs.nix { root = ./.; }
|
Loading…
Reference in a new issue