-
Notifications
You must be signed in to change notification settings - Fork 254
Expand file tree
/
Copy pathflake.nix
More file actions
37 lines (34 loc) · 969 Bytes
/
flake.nix
File metadata and controls
37 lines (34 loc) · 969 Bytes
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
{
inputs = {
utils.url = "github:numtide/flake-utils";
naersk.url = "github:nix-community/naersk";
fenix.url = "github:nix-community/fenix";
};
outputs = { nixpkgs, utils, naersk, fenix, ... }:
utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs {
inherit system;
overlays = [ fenix.overlays.default ];
};
lib = pkgs.lib;
rust-toolchain = pkgs.fenix.fromToolchainFile {
file = ./rust-toolchain.toml;
sha256 = "X/4ZBHO3iW0fOenQ3foEvscgAPJYl2abspaBThDOukI=";
};
naersk' = pkgs.callPackage naersk {
cargo = rust-toolchain;
rustc = rust-toolchain;
};
in {
packages.default = naersk'.buildPackage {
pname = "ravedude";
src = ./.;
buildInputs = with pkgs; lib.optionals pkgs.stdenv.isLinux [
pkg-config
udev
];
};
}
);
}