Skip to content

Commit 456fee4

Browse files
committed
Add flake dev shell
1 parent 129522e commit 456fee4

File tree

6 files changed

+119
-2
lines changed

6 files changed

+119
-2
lines changed

.envrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
use flake

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
/target
2+
/.direnv

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
[package]
22
name = "scope-lock"
33
version = "0.2.5"
4-
edition = "2021"
4+
edition = "2024"
55
# TODO: elaborate
66
description = "Safely extend lifetimes"
77
# TODO: Apache 2.0
88
license = "MIT"
99
repository = "https://github.com/zetanumbers/scope-lock"
10-
rust-version = "1.66"
10+
rust-version = "1.85"
1111

1212
[dependencies]
1313
parking_lot = { version = "0.12.2", features = ["send_guard"] }

flake.lock

Lines changed: 82 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
{
2+
inputs = {
3+
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
4+
flake-utils.url = "github:numtide/flake-utils";
5+
rust-overlay = {
6+
url = "github:oxalica/rust-overlay";
7+
inputs = {
8+
nixpkgs.follows = "nixpkgs";
9+
};
10+
};
11+
};
12+
outputs = { self, nixpkgs, flake-utils, rust-overlay }:
13+
flake-utils.lib.eachDefaultSystem
14+
(system:
15+
let
16+
overlays = [ (import rust-overlay) ];
17+
pkgs = import nixpkgs {
18+
inherit system overlays;
19+
};
20+
rustToolchain = pkgs.pkgsBuildHost.rust-bin.fromRustupToolchainFile ./rust-toolchain.toml;
21+
in
22+
with pkgs;
23+
{
24+
devShells.default = mkShell {
25+
buildInputs = [rustToolchain];
26+
};
27+
}
28+
);
29+
}

rust-toolchain.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
[toolchain]
2+
channel = "1.85"
3+
components = ["rust-analyzer", "rust-src"]
4+

0 commit comments

Comments
 (0)