2020-10-25 13:49:15 +00:00
|
|
|
{ nixpkgs ? <nixpkgs>
|
|
|
|
, configuration ? <darwin-config>
|
|
|
|
, lib ? pkgs.lib
|
2017-01-15 08:51:00 +00:00
|
|
|
, pkgs ? import nixpkgs { inherit system; }
|
2020-10-25 13:49:15 +00:00
|
|
|
, system ? builtins.currentSystem
|
2017-01-15 08:51:00 +00:00
|
|
|
}:
|
2016-12-10 11:57:09 +00:00
|
|
|
|
|
|
|
let
|
2021-04-05 13:05:02 +00:00
|
|
|
evalConfig = import ./eval-config.nix { inherit lib; };
|
2016-12-10 11:57:09 +00:00
|
|
|
|
2020-10-25 13:49:15 +00:00
|
|
|
eval = evalConfig {
|
2021-04-05 13:05:02 +00:00
|
|
|
inherit system;
|
2023-06-30 00:13:09 +00:00
|
|
|
modules = [ configuration nixpkgsRevisionModule ];
|
2020-10-25 13:49:15 +00:00
|
|
|
inputs = { inherit nixpkgs; };
|
2017-01-15 08:51:00 +00:00
|
|
|
};
|
|
|
|
|
2023-06-30 00:13:09 +00:00
|
|
|
nixpkgsRevisionModule =
|
|
|
|
if nixpkgs?rev && lib.isString nixpkgs.rev
|
|
|
|
then { system.nixpkgsRevision = nixpkgs.rev; }
|
|
|
|
else { };
|
|
|
|
|
2020-08-14 21:25:26 +00:00
|
|
|
# The source code of this repo needed by the [un]installers.
|
2020-10-25 13:49:15 +00:00
|
|
|
nix-darwin = lib.cleanSource (
|
|
|
|
lib.cleanSourceWith {
|
2020-08-14 21:25:26 +00:00
|
|
|
# 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 = ./.;
|
|
|
|
}
|
|
|
|
);
|
2016-12-10 11:57:09 +00:00
|
|
|
in
|
2016-12-11 11:49:11 +00:00
|
|
|
|
2020-10-25 13:49:15 +00:00
|
|
|
eval // {
|
2020-08-14 21:25:26 +00:00
|
|
|
installer = pkgs.callPackage ./pkgs/darwin-installer { inherit nix-darwin; };
|
|
|
|
uninstaller = pkgs.callPackage ./pkgs/darwin-uninstaller { inherit nix-darwin; };
|
2016-12-11 11:49:11 +00:00
|
|
|
}
|