summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--flake.lock27
-rw-r--r--flake.nix43
2 files changed, 70 insertions, 0 deletions
diff --git a/flake.lock b/flake.lock
new file mode 100644
index 0000000..ac29acd
--- /dev/null
+++ b/flake.lock
@@ -0,0 +1,27 @@
1{
2 "nodes": {
3 "nixpkgs": {
4 "locked": {
5 "lastModified": 1784453100,
6 "narHash": "sha256-zpGZb8FYui+i8KLtC0nlcmb0voR2zB80Qn8pe7lzIbk=",
7 "owner": "NixOS",
8 "repo": "nixpkgs",
9 "rev": "b471514bed69eff5255c8e63c1f80e5fe56c616f",
10 "type": "github"
11 },
12 "original": {
13 "owner": "NixOS",
14 "ref": "nixpkgs-unstable",
15 "repo": "nixpkgs",
16 "type": "github"
17 }
18 },
19 "root": {
20 "inputs": {
21 "nixpkgs": "nixpkgs"
22 }
23 }
24 },
25 "root": "root",
26 "version": 7
27}
diff --git a/flake.nix b/flake.nix
new file mode 100644
index 0000000..32d30e6
--- /dev/null
+++ b/flake.nix
@@ -0,0 +1,43 @@
1{
2 description = "netbird-tui - terminal UI for the local NetBird daemon";
3
4 inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
5
6 outputs = { self, nixpkgs }:
7 let
8 systems = [ "x86_64-linux" "aarch64-linux" "aarch64-darwin" "x86_64-darwin" ];
9 forAllSystems = f: nixpkgs.lib.genAttrs systems (system:
10 f nixpkgs.legacyPackages.${system});
11 in
12 {
13 packages = forAllSystems (pkgs: rec {
14 netbird-tui = pkgs.buildGoModule rec {
15 pname = "netbird-tui";
16 version = "1.2";
17
18 src = pkgs.fetchFromGitHub {
19 owner = "n0pashkov";
20 repo = "netbird-tui";
21 rev = "v${version}";
22 hash = "sha256-wMOZszRYoItBmCH+EjGvoNXnbo4GDTtaJZdokjbDNeY=";
23 };
24
25 vendorHash = "sha256-S0HY46KF+2zHUI1Zg7obvAtORf8LIncybiCyxBB5AdQ="; # ditto
26
27 ldflags = [ "-s" "-w" ];
28
29 meta = with nixpkgs.lib; {
30 description = "Terminal UI for the local NetBird daemon";
31 homepage = "https://github.com/n0pashkov/netbird-tui";
32 license = licenses.mit;
33 mainProgram = "netbird-tui";
34 };
35 };
36 default = netbird-tui;
37 });
38
39 overlays.default = final: prev: {
40 netbird-tui = self.packages.${final.stdenv.hostPlatform.system}.netbird-tui;
41 };
42 };
43}