home-manger: fix runtime closure
Without this fix a `nix-buid . -A home-manager` would successfully create a `home-manager`. And one could use the included binary until the next garbage collection, after that it would fail with an error that it can not find the `home-manager` sources. Similarily a `nix-copy-closure`d `home-manager` would fail with the same error on the copies target machine. This problem existed on both, the flake as well as the non-flake build of `home-manager`.
This commit is contained in:
parent
bfa7c06436
commit
2e8e1d2f85
12
default.nix
12
default.nix
|
@ -1,6 +1,12 @@
|
||||||
{ pkgs ? import <nixpkgs> { } }:
|
{ pkgs ? import <nixpkgs> { } }:
|
||||||
|
|
||||||
rec {
|
let
|
||||||
|
path = builtins.path {
|
||||||
|
path = ./.;
|
||||||
|
name = "home-manager-source";
|
||||||
|
};
|
||||||
|
|
||||||
|
in rec {
|
||||||
docs = let releaseInfo = pkgs.lib.importJSON ./release.json;
|
docs = let releaseInfo = pkgs.lib.importJSON ./release.json;
|
||||||
in with import ./docs {
|
in with import ./docs {
|
||||||
inherit pkgs;
|
inherit pkgs;
|
||||||
|
@ -12,12 +18,12 @@ rec {
|
||||||
jsonModuleMaintainers = jsonModuleMaintainers; # Unstable, mainly for CI.
|
jsonModuleMaintainers = jsonModuleMaintainers; # Unstable, mainly for CI.
|
||||||
};
|
};
|
||||||
|
|
||||||
home-manager = pkgs.callPackage ./home-manager { path = toString ./.; };
|
home-manager = pkgs.callPackage ./home-manager { inherit path; };
|
||||||
|
|
||||||
install =
|
install =
|
||||||
pkgs.callPackage ./home-manager/install.nix { inherit home-manager; };
|
pkgs.callPackage ./home-manager/install.nix { inherit home-manager; };
|
||||||
|
|
||||||
nixos = import ./nixos;
|
nixos = import ./nixos;
|
||||||
|
|
||||||
path = ./.;
|
inherit path;
|
||||||
}
|
}
|
||||||
|
|
|
@ -111,7 +111,7 @@
|
||||||
inherit pkgs;
|
inherit pkgs;
|
||||||
inherit (releaseInfo) release isReleaseBranch;
|
inherit (releaseInfo) release isReleaseBranch;
|
||||||
};
|
};
|
||||||
hmPkg = pkgs.callPackage ./home-manager { path = "${./.}"; };
|
hmPkg = pkgs.callPackage ./home-manager { path = "${self}"; };
|
||||||
|
|
||||||
testPackages = let
|
testPackages = let
|
||||||
tests = import ./tests { inherit pkgs; };
|
tests = import ./tests { inherit pkgs; };
|
||||||
|
|
Loading…
Reference in a new issue