-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
45 lines (42 loc) · 1.19 KB
/
flake.nix
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
42
43
44
45
{
inputs = {
naersk.url = "github:nix-community/naersk/master";
utils.url = "github:numtide/flake-utils";
nixpkgs-mozilla = {
url = "github:mozilla/nixpkgs-mozilla";
flake = false;
};
};
outputs = { self, nixpkgs, utils, naersk, nixpkgs-mozilla }:
utils.lib.eachDefaultSystem (system:
let
pkgs = (import nixpkgs) {
inherit system;
overlays = [ (import nixpkgs-mozilla) ];
};
naersk-lib = pkgs.callPackage naersk { };
# Search for 'toolchain' on https://github.com/nix-community/naersk
toolchain = (pkgs.rustChannelOf {
rustToolchain = ./toolchain.toml;
sha256 = "sha256-S4dA7ne2IpFHG+EnjXfogmqwGyDFSRWFnJ8cy4KZr1k=";
}).rust;
naersk' = pkgs.callPackage naersk {
cargo = toolchain;
rust = toolchain;
};
in
{
defaultPackage = naersk-lib.buildPackage ./.;
devShell = with pkgs; mkShell {
buildInputs = [
cargo
libiconv
nixpkgs-fmt
nodePackages.wrangler
rustfmt
pre-commit
rustPackages.clippy
];
};
});
}