outputs: allow string interpolation
This commit is contained in:
parent
ccae4f8ef4
commit
d5b5519f4f
2 changed files with 9 additions and 5 deletions
|
@ -47,5 +47,5 @@ let
|
|||
type != "unknown" && builtins.baseNameOf path != ".git" && !matchesGitIgnore path
|
||||
) ./.;
|
||||
in
|
||||
if !(evaluatingInStore) then import selfInStore
|
||||
else import ./outputs.nix
|
||||
if !(evaluatingInStore) then { ... }@args: import selfInStore ({ selfPath = selfInStore; } // args )
|
||||
else { ... }@args: import ./outputs.nix ({ selfPath = selfInStore; } // args)
|
||||
|
|
10
outputs.nix
10
outputs.nix
|
@ -1,4 +1,7 @@
|
|||
{ inputs ? import ./inputs.nix {} }:
|
||||
{
|
||||
inputs ? import ./inputs.nix {},
|
||||
selfPath ? ./.
|
||||
}:
|
||||
|
||||
let
|
||||
|
||||
|
@ -6,6 +9,7 @@ lib = (import "${inputs.nixpkgs}/lib").extend (import ./lib/overlays/version-inf
|
|||
|
||||
self = {
|
||||
inherit inputs lib self;
|
||||
__toString = _: selfPath;
|
||||
modifiedNixpkgs = import ./pkgs/top-level/impure.nix;
|
||||
modifiedNixpkgsPure = import ./pkgs/top-level/default.nix;
|
||||
overlays = {
|
||||
|
@ -40,8 +44,8 @@ self = {
|
|||
./hosts/${name}
|
||||
{
|
||||
config.nixpkgs.overlays = [
|
||||
( import ./pkgs/overlays/selfExpr.nix { nixpkgsPath = "${builtins.toString ./.}/pkgs/top-level/impure.nix"; } )
|
||||
( import "${inputs.nixpkgs}/pkgs/top-level/by-name-overlay.nix" "${builtins.toString ./.}/pkgs/by-name" )
|
||||
( import ./pkgs/overlays/selfExpr.nix { nixpkgsPath = "${self}/pkgs/top-level/impure.nix"; } )
|
||||
( import "${inputs.nixpkgs}/pkgs/top-level/by-name-overlay.nix" "${self}/pkgs/by-name" )
|
||||
self.overlays.versionInfoFixup
|
||||
];
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue