From aeaafcc88a65c6ca18c1b699afbb53e6ff0b5ae2 Mon Sep 17 00:00:00 2001 From: Michael Hoang Date: Fri, 9 Jun 2023 23:58:49 +1000 Subject: [PATCH] flake: add `packages.darwin-uninstaller` --- flake.nix | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/flake.nix b/flake.nix index e0c9c7ef..14b16fba 100644 --- a/flake.nix +++ b/flake.nix @@ -2,7 +2,9 @@ # WARNING this is very much still experimental. description = "A collection of darwin modules"; - outputs = { self, nixpkgs }: { + outputs = { self, nixpkgs }: let + forAllSystems = nixpkgs.lib.genAttrs [ "aarch64-darwin" "x86_64-darwin" ]; + in { lib = { evalConfig = import ./eval-config.nix; @@ -44,7 +46,7 @@ description = "nix flake init -t nix-darwin"; }; - checks = nixpkgs.lib.genAttrs ["aarch64-darwin" "x86_64-darwin"] (system: let + checks = forAllSystems (system: let simple = self.lib.darwinSystem { modules = [ self.darwinModules.simple @@ -59,5 +61,11 @@ manualHTML manpages; }); + + packages = forAllSystems (system: let + pkgs = nixpkgs.legacyPackages.${system}; + in { + darwin-uninstaller = pkgs.callPackage ./pkgs/darwin-uninstaller { nix-darwin = self; }; + }); }; }