summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Didron <fdidron@users.noreply.github.com>2021-05-17 16:19:05 +0900
committerGitHub <noreply@github.com>2021-05-17 16:19:05 +0900
commite488ddd9fa0aa4c9e6f42ace68937d81989b2078 (patch)
treed47d802e6fa25d334b0fe459ecf8d8f229120dee
parent75e758546d0679f4ce5b562625e3de21b45561f1 (diff)
parent85f455f2457822948ff1631664c81b0964874a24 (diff)
Merge pull request #9 from johnrichardrinehart/johnrichardrinehart/nix2.0.1-linux
Add Nix build files
-rw-r--r--default.nix25
-rw-r--r--flake.lock43
-rw-r--r--flake.nix25
3 files changed, 93 insertions, 0 deletions
diff --git a/default.nix b/default.nix
new file mode 100644
index 0000000..a76bcc2
--- /dev/null
+++ b/default.nix
@@ -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;
+ };
+}
diff --git a/flake.lock b/flake.lock
new file mode 100644
index 0000000..1d945d2
--- /dev/null
+++ b/flake.lock
@@ -0,0 +1,43 @@
+{
+ "nodes": {
+ "flake-utils": {
+ "locked": {
+ "lastModified": 1620759905,
+ "narHash": "sha256-WiyWawrgmyN0EdmiHyG2V+fqReiVi8bM9cRdMaKQOFg=",
+ "owner": "numtide",
+ "repo": "flake-utils",
+ "rev": "b543720b25df6ffdfcf9227afafc5b8c1fabfae8",
+ "type": "github"
+ },
+ "original": {
+ "owner": "numtide",
+ "repo": "flake-utils",
+ "type": "github"
+ }
+ },
+ "nixpkgs": {
+ "locked": {
+ "lastModified": 1620808985,
+ "narHash": "sha256-cf/+g1RVawT0rcKmfh2nf/lgnSrj9YZS+1PkCFmoeJQ=",
+ "owner": "nixos",
+ "repo": "nixpkgs",
+ "rev": "327368f98c6a927a84aed3c2f2fd1a7f6983e855",
+ "type": "github"
+ },
+ "original": {
+ "owner": "nixos",
+ "ref": "release-20.09",
+ "repo": "nixpkgs",
+ "type": "github"
+ }
+ },
+ "root": {
+ "inputs": {
+ "flake-utils": "flake-utils",
+ "nixpkgs": "nixpkgs"
+ }
+ }
+ },
+ "root": "root",
+ "version": 7
+}
diff --git a/flake.nix b/flake.nix
new file mode 100644
index 0000000..d68e155
--- /dev/null
+++ b/flake.nix
@@ -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;
+ }
+ );
+}