-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathflake.nix
More file actions
39 lines (38 loc) · 1.13 KB
/
flake.nix
File metadata and controls
39 lines (38 loc) · 1.13 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
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/release-24.11";
parts.url = "github:hercules-ci/flake-parts";
naersk.url = "github:nix-community/naersk";
rust = {
url = "github:oxalica/rust-overlay";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = inputs@{ nixpkgs, parts, rust, naersk, ... }:
parts.lib.mkFlake { inherit inputs; } {
systems = [ "x86_64-linux" "aarch64-linux" ];
perSystem = { system, ... }:
let
overlays = [ (import rust) ];
pkgs = import nixpkgs { inherit system overlays; };
toolchain = pkgs.pkgsBuildHost.rust-bin.fromRustupToolchainFile
./rust-toolchain.toml;
naersk-lib = pkgs.callPackage naersk {
cargo = toolchain;
rustc = toolchain;
};
in {
devShells.default = pkgs.mkShell {
packages = with pkgs; [
toolchain
just
bacon
nil
nixfmt-classic
taplo
];
};
packages.default = naersk-lib.buildPackage { src = ./.; };
};
};
}