-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathflake.nix
More file actions
41 lines (39 loc) · 1.1 KB
/
flake.nix
File metadata and controls
41 lines (39 loc) · 1.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
{
inputs = {
naersk.url = "github:nix-community/naersk/master";
nixpkgs = {
# Randomly chosen commit on 2025-12-11 to have a
# truely reproducible environment with cargo, rustc, etc. in
# specific versions. New commit version can be found on
# https://github.com/NixOS/nixpkgs/tree/nixos-unstable-small
url = "github:NixOS/nixpkgs/6f313d8e9be4d7db523962ecc3ce97c951bacb1f";
};
utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, utils, naersk }:
utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs { inherit system; };
naersk-lib = pkgs.callPackage naersk { };
in
{
defaultPackage = naersk-lib.buildPackage ./.;
devShell = with pkgs; mkShell {
buildInputs = [
# Rust general
cargo
rustc
rustfmt
rustPackages.clippy
# Dev Tools
just
prek
# WASM
lld
wasm-pack
];
RUST_SRC_PATH = rustPlatform.rustLibSrc;
};
}
);
}