Skip to content
This repository was archived by the owner on Aug 21, 2024. It is now read-only.

Commit e488ddd

Browse files
authored
Merge pull request #9 from johnrichardrinehart/johnrichardrinehart/nix
Add Nix build files
2 parents 75e7585 + 85f455f commit e488ddd

3 files changed

Lines changed: 93 additions & 0 deletions

File tree

default.nix

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{ pkgs ? (import <nixpkgs> { }), lib ? (import <nixpkgs/lib>), system ? builtins.currentSystem }:
2+
3+
assert lib.versionAtLeast pkgs.go.version "1.14";
4+
5+
pkgs.buildGoModule rec {
6+
name = "wally-cli";
7+
version = "v2.0.0";
8+
9+
src = ./.;
10+
11+
vendorSha256 = "HffgkuKmaOjTYi+jQ6vBlC50JqqbYiikURT6TCqL7e0=";
12+
13+
subPackages = [ "." ];
14+
15+
buildInputs = with pkgs; [ libusb1 ];
16+
nativeBuildInputs = with pkgs; [ pkg-config ];
17+
18+
meta = with lib; {
19+
description = "Flash your ZSA Keyboard the EZ way.";
20+
homepage = "https://github.com/zsa/wally-cli";
21+
license = licenses.mit;
22+
maintainers = [ johnrichardrinehart ];
23+
platforms = platforms.linux ++ platforms.darwin;
24+
};
25+
}

flake.lock

Lines changed: 43 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: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
inputs = {
3+
nixpkgs.url = "github:nixos/nixpkgs/release-20.09";
4+
flake-utils.url = "github:numtide/flake-utils";
5+
};
6+
7+
8+
outputs = inputs:
9+
let
10+
inherit (inputs.flake-utils.lib) eachDefaultSystem flattenTree mkApp;
11+
in
12+
eachDefaultSystem (system:
13+
let
14+
pkgs = inputs.nixpkgs.legacyPackages.${system};
15+
lib = inputs.nixpkgs.lib;
16+
in
17+
rec {
18+
defaultPackage = (import ./default.nix) {
19+
inherit pkgs lib system;
20+
};
21+
22+
defaultApp = defaultPackage;
23+
}
24+
);
25+
}

0 commit comments

Comments
 (0)