Skip to content

Commit dd37d1f

Browse files
committed
use rust-toolchain file in flake and fix windows_sdk ref
1 parent 1e16621 commit dd37d1f

File tree

3 files changed

+215
-27
lines changed

3 files changed

+215
-27
lines changed

flake.lock

Lines changed: 199 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: 5 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
url = "github:rvolosatovs/fenix/fix/rustc-patch";
1111
};
1212
windows_sdk = {
13-
url = "github:modelfoxdotdev/windows_sdk";
13+
url = "github:tangramdotdev/windows_sdk";
1414
};
1515
};
1616
outputs =
@@ -77,31 +77,10 @@
7777
mkdir $out
7878
curl https://nodejs.org/dist/v16.4.0/win-x64/node.lib --output $out/node.lib
7979
'';
80-
rust =
81-
let
82-
toolchain = {
83-
channel = "nightly";
84-
date = "2022-02-24";
85-
sha256 = "sha256-TpJKRroEs7V2BTo2GFPJlEScYVArFY2MnGpYTxbnSo8=";
86-
};
87-
in
88-
with inputs.fenix.packages.${system}; combine (with toolchainOf toolchain; [
89-
cargo
90-
clippy-preview
91-
rust-src
92-
rust-std
93-
rustc
94-
rustfmt-preview
95-
(targets.aarch64-unknown-linux-gnu.toolchainOf toolchain).rust-std
96-
(targets.aarch64-unknown-linux-musl.toolchainOf toolchain).rust-std
97-
(targets.aarch64-apple-darwin.toolchainOf toolchain).rust-std
98-
(targets.wasm32-unknown-unknown.toolchainOf toolchain).rust-std
99-
(targets.x86_64-unknown-linux-gnu.toolchainOf toolchain).rust-std
100-
(targets.x86_64-unknown-linux-musl.toolchainOf toolchain).rust-std
101-
(targets.x86_64-apple-darwin.toolchainOf toolchain).rust-std
102-
(targets.x86_64-pc-windows-gnu.toolchainOf toolchain).rust-std
103-
(targets.x86_64-pc-windows-msvc.toolchainOf toolchain).rust-std
104-
]);
80+
rust = inputs.fenix.packages.${system}.fromToolchainFile {
81+
dir = ./.;
82+
sha256 = "sha256-Ht5GU1xscXyhtc1zH/ppb2zJ259UXOvflcnfGdi9Adw=";
83+
};
10584
windows_sdk_manifest_url = "https://download.visualstudio.microsoft.com/download/pr/9a26f37e-6001-429b-a5db-c5455b93953c/25b853a26e065037b83c3dd6aac74bfbfd1f09c9639d1f8c877ecc8d11ea0feb/VisualStudio.vsman";
10685
windows_sdk_manifest_sha256 = "6a2676b65e32c04db17e80d7d87ba60b0c75dd3465c7db5e76ae3db8ca409d85";
10786
windows_sdk_manifest = pkgs.runCommand "manifest"

rust-toolchain.toml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,14 @@
11
[toolchain]
22
channel = "nightly-2022-03-29"
33
components = [ "clippy", "rustfmt" ]
4-
targets = [ "wasm32-unknown-unknown" ]
4+
targets = [
5+
"aarch64-unknown-linux-gnu",
6+
"aarch64-unknown-linux-musl",
7+
"aarch64-apple-darwin",
8+
"wasm32-unknown-unknown",
9+
"x86_64-unknown-linux-gnu",
10+
"x86_64-unknown-linux-musl",
11+
"x86_64-apple-darwin",
12+
"x86_64-pc-windows-gnu",
13+
"x86_64-pc-windows-msvc",
14+
]

0 commit comments

Comments
 (0)