Skip to content
This repository was archived by the owner on Oct 25, 2023. It is now read-only.

Commit 85c341a

Browse files
committed
build: use rust stable instead of rust nightly
Nightly isn't required, and this should create the dev shell faster by leveraging the nix cache.
1 parent ff10a10 commit 85c341a

2 files changed

Lines changed: 2 additions & 67 deletions

File tree

flake.lock

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

flake.nix

Lines changed: 2 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,6 @@
77
inputs.nixpkgs.follows = "nixpkgs";
88
inputs.flake-utils.follows = "flake-utils";
99
};
10-
fenix = {
11-
url = "github:nix-community/fenix";
12-
inputs.nixpkgs.follows = "nixpkgs";
13-
};
1410
pre-commit-hooks = {
1511
url = "github:cachix/pre-commit-hooks.nix";
1612
inputs.flake-utils.follows = "flake-utils";
@@ -22,7 +18,6 @@
2218
self,
2319
nixpkgs,
2420
crane,
25-
fenix,
2621
flake-utils,
2722
pre-commit-hooks,
2823
...
@@ -32,29 +27,11 @@
3227
inherit system;
3328
};
3429

35-
fenix-channel = fenix.packages.${system}.latest;
36-
fenix-toolchain = fenix-channel.withComponents [
37-
"rustc"
38-
"cargo"
39-
"clippy"
40-
"rust-analysis"
41-
"rust-src"
42-
"rustfmt"
43-
];
44-
45-
craneLib = crane.lib.${system}.overrideToolchain fenix-toolchain;
30+
craneLib = crane.lib.${system};
4631

4732
# Common derivation arguments used for all builds
4833
commonArgs = {
4934
src = craneLib.cleanCargoSource ./.;
50-
51-
# Add extra inputs here or any other derivation settings
52-
# doCheck = true;
53-
buildInputs = with pkgs; [
54-
fenix-channel.rustc
55-
fenix-channel.clippy
56-
nodePackages.typescript
57-
];
5835
};
5936

6037
# Build *just* the cargo dependencies, so we can reuse
@@ -109,11 +86,8 @@
10986
};
11087
devShells = {
11188
default = nixpkgs.legacyPackages.${system}.mkShell {
112-
buildInputs = commonArgs.buildInputs;
11389
nativeBuildInputs = [
114-
fenix-toolchain
115-
fenix.packages.${system}.rust-analyzer
116-
90+
pkgs.cargo
11791
pkgs.nodejs
11892
];
11993

0 commit comments

Comments
 (0)