Browse Source

build(flake): darwin devShell resuse eza deps

Co-authored-by: Ihar Hrachyshka <ihar.hrachyshka@gmail.com>
Signed-off-by: Christina Sørensen <christina@cafkafk.com>
Christina Sørensen 1 year ago
parent
commit
2b616805b6
1 changed files with 30 additions and 22 deletions
  1. 30 22
      flake.nix

+ 30 - 22
flake.nix

@@ -73,7 +73,13 @@
         };
 
         treefmtEval = treefmt-nix.lib.evalModule pkgs ./treefmt.nix;
-        buildInputs = with pkgs; [zlib] ++ lib.optionals stdenv.isDarwin [libiconv darwin.apple_sdk.frameworks.Security];
+
+        darwinBuildInputs = pkgs.lib.optionals pkgs.stdenv.isDarwin [
+          pkgs.libiconv
+          pkgs.darwin.apple_sdk.frameworks.Security
+        ];
+
+        buildInputs = [pkgs.zlib] ++ darwinBuildInputs;
       in rec {
         # For `nix fmt`
         formatter = treefmtEval.config.build.wrapper;
@@ -215,27 +221,29 @@
         # For `nix develop`:
         devShells.default = pkgs.mkShell {
           inherit (self.checks.${system}.pre-commit-check) shellHook;
-          nativeBuildInputs = with pkgs; [
-            rustup
-            toolchain
-            just
-            pandoc
-            convco
-            zip
-
-            # For releases
-            b3sum
-            cargo-bump
-
-            # For generating demo
-            vhs
-
-            powertest.packages.${pkgs.system}.default
-
-            cargo-hack
-            cargo-udeps
-            cargo-outdated
-          ];
+          nativeBuildInputs = with pkgs;
+            [
+              rustup
+              toolchain
+              just
+              pandoc
+              convco
+              zip
+
+              # For releases
+              b3sum
+              cargo-bump
+
+              # For generating demo
+              vhs
+
+              powertest.packages.${pkgs.system}.default
+
+              cargo-hack
+              cargo-udeps
+              cargo-outdated
+            ]
+            ++ darwinBuildInputs;
         };
 
         # For `nix flake check`