Skip to content

Instantly share code, notes, and snippets.

@lucperkins
Last active September 12, 2024 17:37
Show Gist options
  • Save lucperkins/aca6b7d8c98292c2f592c91fff1a8592 to your computer and use it in GitHub Desktop.
Save lucperkins/aca6b7d8c98292c2f592c91fff1a8592 to your computer and use it in GitHub Desktop.
keyboard-configurator flake
{
description = "System76 Keyboard Configurator";
inputs = {
flake-utils.url = "github:numtide/flake-utils";
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.05";
naersk.url = "github:nix-community/naersk";
};
outputs = { self, nixpkgs, flake-utils, naersk }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs { inherit system; };
naersk-lib = naersk.lib."${system}";
in
{
packages = rec {
default = system76-keyboard-configurator;
system76-keyboard-configurator = naersk-lib.buildPackage {
name = "system76-keyboard-configurator";
version = "1.3.0";
src = ./.;
buildInputs = with pkgs; [ pkg-config rustc cargo hidapi glib gtk3 ];
};
};
devShells.default = pkgs.mkShell {
packages = with pkgs; [ pkg-config rustc cargo hidapi glib gtk3 ];
};
formatter = pkgs.nixfmt;
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment