summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--flake.lock49
-rw-r--r--flake.nix26
2 files changed, 32 insertions, 43 deletions
diff --git a/flake.lock b/flake.lock
index 79f866b..2321089 100644
--- a/flake.lock
+++ b/flake.lock
@@ -2,23 +2,16 @@
"nodes": {
"crane": {
"inputs": {
- "flake-compat": "flake-compat",
- "flake-utils": [
- "flake-utils"
- ],
"nixpkgs": [
"nixpkgs"
- ],
- "rust-overlay": [
- "rust-overlay"
]
},
"locked": {
- "lastModified": 1691803597,
- "narHash": "sha256-khWW1Owzselq5o816Lb7x624d6QGnv+kpronK3ndkr4=",
+ "lastModified": 1705974079,
+ "narHash": "sha256-HyC3C2esW57j6bG0MKwX4kQi25ltslRnr6z2uvpadJo=",
"owner": "ipetkov",
"repo": "crane",
- "rev": "7809d369710abb17767b624f9e72b500373580bc",
+ "rev": "0b4e511fe6e346381e31d355e03de52aa43e8cb2",
"type": "github"
},
"original": {
@@ -27,32 +20,16 @@
"type": "github"
}
},
- "flake-compat": {
- "flake": false,
- "locked": {
- "lastModified": 1673956053,
- "narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=",
- "owner": "edolstra",
- "repo": "flake-compat",
- "rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9",
- "type": "github"
- },
- "original": {
- "owner": "edolstra",
- "repo": "flake-compat",
- "type": "github"
- }
- },
"flake-utils": {
"inputs": {
"systems": "systems"
},
"locked": {
- "lastModified": 1689068808,
- "narHash": "sha256-6ixXo3wt24N/melDWjq70UuHQLxGV8jZvooRanIHXw0=",
+ "lastModified": 1705309234,
+ "narHash": "sha256-uNRRNRKmJyCRC/8y1RqBkqWBLM034y4qN7EprSdmgyA=",
"owner": "numtide",
"repo": "flake-utils",
- "rev": "919d646de7be200f3bf08cb76ae1f09402b6f9b4",
+ "rev": "1ef2e671c3b0c19053962c07dbda38332dcebf26",
"type": "github"
},
"original": {
@@ -63,16 +40,16 @@
},
"nixpkgs": {
"locked": {
- "lastModified": 1692587767,
- "narHash": "sha256-J1ZaJEWgUoT4zfNnhKukYLjel67bQyNHL1FqQ/kqCLo=",
+ "lastModified": 1706098335,
+ "narHash": "sha256-r3dWjT8P9/Ah5m5ul4WqIWD8muj5F+/gbCdjiNVBKmU=",
"owner": "NixOS",
"repo": "nixpkgs",
- "rev": "57492e92b9829946d866b700c101d9a5cc8d749e",
+ "rev": "a77ab169a83a4175169d78684ddd2e54486ac651",
"type": "github"
},
"original": {
"owner": "NixOS",
- "ref": "nixos-23.05",
+ "ref": "nixos-23.11",
"repo": "nixpkgs",
"type": "github"
}
@@ -95,11 +72,11 @@
]
},
"locked": {
- "lastModified": 1692670201,
- "narHash": "sha256-WbCKJRfh1Zb7N7g8Fzq7/Hg6i6yCbvaa0OAi4cSHk1w=",
+ "lastModified": 1706235145,
+ "narHash": "sha256-3jh5nahTlcsX6QFcMPqxtLn9p9CgT9RSce5GLqjcpi4=",
"owner": "oxalica",
"repo": "rust-overlay",
- "rev": "bf5196c27545735374376d96d41f209bae3643e1",
+ "rev": "3a57c4e29cb2beb777b2e6ae7309a680585b8b2f",
"type": "github"
},
"original": {
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
+ ];
+
};
+
}
);
}