summary refs log tree commit diff
path: root/flake.nix
diff options
context:
space:
mode:
Diffstat (limited to 'flake.nix')
-rw-r--r--flake.nix26
1 files changed, 19 insertions, 7 deletions
diff --git a/flake.nix b/flake.nix
index 6d49a6f..95ac187 100644
--- a/flake.nix
+++ b/flake.nix
@@ -1,6 +1,6 @@
 {
   inputs = {
-    nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.05";
+    nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.11";
     flake-utils.url = "github:numtide/flake-utils";
 
     rust-overlay = {
@@ -14,8 +14,6 @@
       url = "github:ipetkov/crane";
       inputs = {
         nixpkgs.follows = "nixpkgs";
-        flake-utils.follows = "flake-utils";
-        rust-overlay.follows = "rust-overlay";
       };
     };
   };
@@ -27,9 +25,14 @@
           pkgs = import nixpkgs {
             inherit system overlays;
           };
-          craneLib = crane.lib.${system};
+          # craneLib = crane.lib.${system};
+          craneLib = (crane.mkLib pkgs).overrideToolchain rustToolchain;
+          rustToolchain = pkgs.rust-bin.stable.latest.default.override {
+            extensions = [ "rust-src" ];
+          };
+
           src = craneLib.cleanCargoSource (craneLib.path ./.);
-          nativeBuildInputs = with pkgs; [ rust-bin.stable.latest.default pkg-config ];
+          nativeBuildInputs = with pkgs; [ rustToolchain pkg-config ];
           buildInputs = with pkgs; [ openssl sqlite ];
           commonArgs = {
             inherit src nativeBuildInputs buildInputs;
@@ -62,10 +65,19 @@
             inherit bin dockerImage;
             default = bin;
           };
-          devShells.default = mkShell {
+          devShells.default = craneLib.devShell {
             inputsFrom = [ bin ];
-            buildInputs = [ pkgs.cargo-nextest pkgs.dive pkgs.docker ];
+            packages = [
+              pkgs.cargo-audit
+              pkgs.cargo-watch
+              pkgs.rust-analyzer
+              pkgs.cargo-nextest
+              pkgs.cargo
+              pkgs.nixpkgs-fmt
+            ];
+
           };
+
         }
       );
 }