-
Notifications
You must be signed in to change notification settings - Fork 4
/
flake.nix
32 lines (31 loc) · 993 Bytes
/
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
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable-small";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem
(system:
let pkgs = import nixpkgs { inherit system; overlays = [ self.overlay ]; }; in
{
packages = { inherit (pkgs) nizctl niz-qmk-configurator; };
devShell = pkgs.mkShell { inputsFrom = [ pkgs.nizctl ]; };
defaultPackage = pkgs.nizctl;
}
) //
{
overlay = final: prev: {
nizctl = final.rustPlatform.buildRustPackage {
name = "nizctl";
src = final.lib.cleanSource ./.;
nativeBuildInputs = [ final.pkg-config ];
buildInputs = [ final.hidapi final.libusb ];
cargoLock = {
lockFile = ./Cargo.lock;
};
};
niz-qmk-configurator =
final.callPackage ./niz-qmk-configurator.nix { };
};
};
}