Skip to content

Commit 5ce20ad

Browse files
authored
Merge pull request #144 from junikimm717/master
Added nix flakes
2 parents 29da524 + b091ab5 commit 5ce20ad

File tree

3 files changed

+106
-0
lines changed

3 files changed

+106
-0
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/result
12
/target
23
/linux/system76-keyboard-configurator
34
/windows/out

flake.lock

Lines changed: 76 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
{
2+
description = "System76 Keyboard Configurator";
3+
4+
inputs = {
5+
flake-utils.url = "github:numtide/flake-utils";
6+
nixpkgs.url = "github:nixos/nixpkgs/nixos-22.05";
7+
naersk.url = "github:nix-community/naersk";
8+
};
9+
10+
outputs = { self, nixpkgs, flake-utils, naersk }:
11+
flake-utils.lib.eachDefaultSystem (system:
12+
let
13+
pkgs = import nixpkgs { inherit system; };
14+
naersk-lib = naersk.lib."${system}";
15+
cargo = pkgs.cargo;
16+
in {
17+
defaultPackage = naersk-lib.buildPackage {
18+
name = "system76-keyboard-configurator";
19+
version = "1.2.0";
20+
src = ./.;
21+
buildInputs =
22+
(with pkgs; [ pkg-config rustc cargo hidapi glib gtk3 ]);
23+
};
24+
devShell = pkgs.mkShell {
25+
buildInputs = with pkgs; [ pkg-config rustc cargo hidapi glib gtk3 ];
26+
};
27+
formatter = nixpkgs.legacyPackages."${system}".nixfmt;
28+
});
29+
}

0 commit comments

Comments
 (0)