about summary refs log tree commit diff
diff options
context:
space:
mode:
authorVika <vika@fireburn.ru>2022-05-26 00:19:33 +0300
committerVika <vika@fireburn.ru>2022-05-26 00:19:33 +0300
commit8eedee638a5cc54b03baedea3697280eef719469 (patch)
treefd516629bfb56fe86dcf321061fa8974de50c9b9
parent256ba343a05bc93e576837b75b8739c0fb5ed5cd (diff)
downloadkittybox-8eedee638a5cc54b03baedea3697280eef719469.tar.zst
flake.nix: move the devShell into its own file
-rw-r--r--flake.nix14
-rw-r--r--shell.nix19
2 files changed, 20 insertions, 13 deletions
diff --git a/flake.nix b/flake.nix
index 165b386..5c3ed37 100644
--- a/flake.nix
+++ b/flake.nix
@@ -40,18 +40,6 @@
       };
     };
 
-    devShells.default = pkgs.mkShell {
-      name = "rust-dev-shell";
-
-      nativeBuildInputs = with pkgs; [
-        # required for tokio-console's console-subscriber
-        pkg-config protobuf
-        # required for httpmock, not actually used in the release
-        openssl.dev zlib
-        xh systemfd tokio-console
-        cargo-watch cargo-edit cargo-outdated
-        rustc cargo rust-analyzer clippy
-      ];
-    };
+    devShells.default = pkgs.callPackage ./shell.nix {};
   });
 }
diff --git a/shell.nix b/shell.nix
new file mode 100644
index 0000000..32cff3e
--- /dev/null
+++ b/shell.nix
@@ -0,0 +1,19 @@
+{ mkShell, rustc, cargo, rust-analyzer, clippy
+, cargo-watch, cargo-edit, cargo-outdated
+, xh, systemfd, tokio-console
+, pkg-config, protobuf, openssl, zlib
+}:
+mkShell {
+  name = "rust-dev-shell";
+
+  nativeBuildInputs = [
+    rustc cargo rust-analyzer clippy
+    cargo-watch cargo-edit cargo-outdated
+    xh systemfd tokio-console
+    # required for tokio-console's console-subscriber
+    pkg-config protobuf
+    # required for httpmock, not actually used in the release
+    openssl.dev zlib
+
+  ];
+}