diff options
| author | Ryan Schanzenbacher <ryan@rschanz.org> | 2026-07-19 22:03:49 -0400 |
|---|---|---|
| committer | Ryan Schanzenbacher <ryan@rschanz.org> | 2026-07-19 22:03:49 -0400 |
| commit | efa74d02ad42ee7aeaf5c97240929063118c6252 (patch) | |
| tree | c294f5d096ccf3ce5e21fdaac9816def15cc49de /flake.nix | |
Diffstat (limited to 'flake.nix')
| -rw-r--r-- | flake.nix | 43 |
1 files changed, 43 insertions, 0 deletions
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 | } | ||
