summaryrefslogtreecommitdiff
path: root/default.nix
diff options
context:
space:
mode:
authorBas van Dijk <v.dijk.bas@gmail.com>2020-08-14 23:25:26 +0200
committerBas van Dijk <v.dijk.bas@gmail.com>2020-08-21 21:22:09 +0200
commit03d39316567b2c63a803fc12c0cb4abfc0e40bdd (patch)
treeb06866ddcf1e63725eb81c60f6bbd35642a75e1b /default.nix
parent47fe6db9c9cd22c4ba57df3281f98f454880bea7 (diff)
darwin-[un]installer: make sure all dependencies are part of the closure
This makes sure the `darwin-installer` and `darwin-uninstaller` packages can be nix copied to any target and reliably be executed there.
Diffstat (limited to 'default.nix')
-rw-r--r--default.nix15
1 files changed, 13 insertions, 2 deletions
diff --git a/default.nix b/default.nix
index 0cc16cd..79085aa 100644
--- a/default.nix
+++ b/default.nix
@@ -24,6 +24,17 @@ let
# Was moved in nixpkgs #82751, so both need to be handled here until 20.03 is deprecated.
# https://github.com/NixOS/nixpkgs/commits/dcdd232939232d04c1132b4cc242dd3dac44be8c
_module = eval._module or eval.config._module;
+
+ # The source code of this repo needed by the [un]installers.
+ nix-darwin = pkgs.lib.cleanSource (
+ pkgs.lib.cleanSourceWith {
+ # We explicitly specify a name here otherwise `cleanSource` will use the
+ # basename of ./. which might be different for different clones of this
+ # repo leading to non-reproducible outputs.
+ name = "nix-darwin";
+ src = ./.;
+ }
+ );
in
{
@@ -32,6 +43,6 @@ in
system = eval.config.system.build.toplevel;
- installer = pkgs.callPackage ./pkgs/darwin-installer {};
- uninstaller = pkgs.callPackage ./pkgs/darwin-uninstaller {};
+ installer = pkgs.callPackage ./pkgs/darwin-installer { inherit nix-darwin; };
+ uninstaller = pkgs.callPackage ./pkgs/darwin-uninstaller { inherit nix-darwin; };
}