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

Commit

Permalink
Merge pull request #9 from johnrichardrinehart/johnrichardrinehart/nix
Browse files Browse the repository at this point in the history
Add Nix build files
  • Loading branch information
fdidron authored May 17, 2021
2 parents 75e7585 + 85f455f commit e488ddd
Show file tree
Hide file tree
Showing 3 changed files with 93 additions and 0 deletions.
25 changes: 25 additions & 0 deletions default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{ pkgs ? (import <nixpkgs> { }), lib ? (import <nixpkgs/lib>), system ? builtins.currentSystem }:

assert lib.versionAtLeast pkgs.go.version "1.14";

pkgs.buildGoModule rec {
name = "wally-cli";
version = "v2.0.0";

src = ./.;

vendorSha256 = "HffgkuKmaOjTYi+jQ6vBlC50JqqbYiikURT6TCqL7e0=";

subPackages = [ "." ];

buildInputs = with pkgs; [ libusb1 ];
nativeBuildInputs = with pkgs; [ pkg-config ];

meta = with lib; {
description = "Flash your ZSA Keyboard the EZ way.";
homepage = "https://github.com/zsa/wally-cli";
license = licenses.mit;
maintainers = [ johnrichardrinehart ];
platforms = platforms.linux ++ platforms.darwin;
};
}
43 changes: 43 additions & 0 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

25 changes: 25 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/release-20.09";
flake-utils.url = "github:numtide/flake-utils";
};


outputs = inputs:
let
inherit (inputs.flake-utils.lib) eachDefaultSystem flattenTree mkApp;
in
eachDefaultSystem (system:
let
pkgs = inputs.nixpkgs.legacyPackages.${system};
lib = inputs.nixpkgs.lib;
in
rec {
defaultPackage = (import ./default.nix) {
inherit pkgs lib system;
};

defaultApp = defaultPackage;
}
);
}

0 comments on commit e488ddd

Please sign in to comment.