Skip to content

Commit 3da8681

Browse files
authored
updates (#856)
Signed-off-by: Jess Frazelle <[email protected]>
1 parent 905f2e1 commit 3da8681

File tree

2 files changed

+52
-48
lines changed

2 files changed

+52
-48
lines changed

flake.lock

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

flake.nix

Lines changed: 46 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -8,60 +8,64 @@
88
};
99

1010
# Flake outputs
11-
outputs = { self, nixpkgs, rust-overlay }:
12-
let
13-
# Overlays enable you to customize the Nixpkgs attribute set
14-
overlays = [
15-
# Makes a `rust-bin` attribute available in Nixpkgs
16-
(import rust-overlay)
17-
# Provides a `rustToolchain` attribute for Nixpkgs that we can use to
18-
# create a Rust environment
19-
(self: super: {
20-
rustToolchain = super. rust-bin.stable.latest.default.override {
21-
targets = [ "wasm32-unknown-unknown" ];
22-
extensions = [ "rustfmt" "llvm-tools-preview" ];
23-
};
24-
})
25-
];
26-
27-
# Systems supported
28-
allSystems = [
29-
"x86_64-linux" # 64-bit Intel/AMD Linux
30-
"aarch64-linux" # 64-bit ARM Linux
31-
"x86_64-darwin" # 64-bit Intel macOS
32-
"aarch64-darwin" # 64-bit ARM macOS
33-
];
11+
outputs = {
12+
self,
13+
nixpkgs,
14+
rust-overlay,
15+
}: let
16+
# Overlays enable you to customize the Nixpkgs attribute set
17+
overlays = [
18+
# Makes a `rust-bin` attribute available in Nixpkgs
19+
(import rust-overlay)
20+
# Provides a `rustToolchain` attribute for Nixpkgs that we can use to
21+
# create a Rust environment
22+
(self: super: {
23+
rustToolchain = super.rust-bin.stable.latest.default.override {
24+
targets = ["wasm32-unknown-unknown"];
25+
extensions = ["rustfmt" "llvm-tools-preview"];
26+
};
27+
})
28+
];
3429

35-
# Helper to provide system-specific attributes
36-
forAllSystems = f: nixpkgs.lib.genAttrs allSystems (system: f {
37-
pkgs = import nixpkgs { inherit overlays system; };
38-
});
30+
# Systems supported
31+
allSystems = [
32+
"x86_64-linux" # 64-bit Intel/AMD Linux
33+
"aarch64-linux" # 64-bit ARM Linux
34+
"x86_64-darwin" # 64-bit Intel macOS
35+
"aarch64-darwin" # 64-bit ARM macOS
36+
];
3937

40-
in
41-
{
42-
# Development environment output
43-
devShells = forAllSystems ({ pkgs }: {
44-
default = pkgs.mkShell {
45-
# The Nix packages provided in the environment
46-
packages = (with pkgs; [
38+
# Helper to provide system-specific attributes
39+
forAllSystems = f:
40+
nixpkgs.lib.genAttrs allSystems (system:
41+
f {
42+
pkgs = import nixpkgs {inherit overlays system;};
43+
});
44+
in {
45+
# Development environment output
46+
devShells = forAllSystems ({pkgs}: {
47+
default = pkgs.mkShell {
48+
# The Nix packages provided in the environment
49+
packages =
50+
(with pkgs; [
4751
# The package provided by our custom overlay. Includes cargo, Clippy, cargo-fmt,
4852
# rustdoc, rustfmt, and other tools.
4953
rustToolchain
5054

51-
cargo-llvm-cov
5255
cargo-nextest
5356

5457
just
5558
openssl
5659
pkg-config
57-
]) ++ pkgs.lib.optionals pkgs.stdenv.isDarwin (with pkgs; [
58-
libiconv
60+
])
61+
++ pkgs.lib.optionals pkgs.stdenv.isDarwin (with pkgs; [
62+
libiconv
5963
darwin.apple_sdk.frameworks.Security
6064
]);
6165

62-
TARGET_CC = "${pkgs.stdenv.cc}/bin/${pkgs.stdenv.cc.targetPrefix}cc";
63-
LIBCLANG_PATH = "${pkgs.libclang.lib}/lib";
64-
};
65-
});
66-
};
66+
TARGET_CC = "${pkgs.stdenv.cc}/bin/${pkgs.stdenv.cc.targetPrefix}cc";
67+
LIBCLANG_PATH = "${pkgs.libclang.lib}/lib";
68+
};
69+
});
70+
};
6771
}

0 commit comments

Comments
 (0)