From db2b4adb1094bfb0da28eae6f2519fce71f7838f Mon Sep 17 00:00:00 2001 From: Aly Raffauf Date: Sun, 8 Sep 2024 20:33:10 -0400 Subject: [PATCH] flake: fix devhsell problems on macOS --- flake.nix | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/flake.nix b/flake.nix index 078f03eb..4da878f5 100644 --- a/flake.nix +++ b/flake.nix @@ -63,13 +63,24 @@ }; outputs = {self, ...}: let - allSystems = [ + allLinuxSystems = [ "aarch64-linux" "x86_64-linux" + ]; + + allMacSystems = [ "aarch64-darwin" "x86_64-darwin" ]; + allSystems = allLinuxSystems ++ allMacSystems; + + forAllLinuxSystems = f: + self.inputs.nixpkgs.lib.genAttrs allLinuxSystems (system: + f { + pkgs = import self.inputs.nixpkgs {inherit system;}; + }); + forAllSystems = f: self.inputs.nixpkgs.lib.genAttrs allSystems (system: f { @@ -85,7 +96,7 @@ "slateport" ]; in { - devShells = forAllSystems ({pkgs}: { + devShells = forAllLinuxSystems ({pkgs}: { default = pkgs.mkShell { packages = (with pkgs; [ @@ -105,7 +116,7 @@ formatter = forAllSystems ({pkgs}: pkgs.alejandra); - packages = forAllSystems ({pkgs}: { + packages = forAllLinuxSystems ({pkgs}: { default = pkgs.writeShellApplication { name = "clean-install"; text = ./flake/clean-install.sh;