From efa74d02ad42ee7aeaf5c97240929063118c6252 Mon Sep 17 00:00:00 2001 From: Ryan Schanzenbacher Date: Sun, 19 Jul 2026 22:03:49 -0400 Subject: initial commit --- flake.nix | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 flake.nix (limited to 'flake.nix') diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..32d30e6 --- /dev/null +++ b/flake.nix @@ -0,0 +1,43 @@ +{ + description = "netbird-tui - terminal UI for the local NetBird daemon"; + + inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; + + outputs = { self, nixpkgs }: + let + systems = [ "x86_64-linux" "aarch64-linux" "aarch64-darwin" "x86_64-darwin" ]; + forAllSystems = f: nixpkgs.lib.genAttrs systems (system: + f nixpkgs.legacyPackages.${system}); + in + { + packages = forAllSystems (pkgs: rec { + netbird-tui = pkgs.buildGoModule rec { + pname = "netbird-tui"; + version = "1.2"; + + src = pkgs.fetchFromGitHub { + owner = "n0pashkov"; + repo = "netbird-tui"; + rev = "v${version}"; + hash = "sha256-wMOZszRYoItBmCH+EjGvoNXnbo4GDTtaJZdokjbDNeY="; + }; + + vendorHash = "sha256-S0HY46KF+2zHUI1Zg7obvAtORf8LIncybiCyxBB5AdQ="; # ditto + + ldflags = [ "-s" "-w" ]; + + meta = with nixpkgs.lib; { + description = "Terminal UI for the local NetBird daemon"; + homepage = "https://github.com/n0pashkov/netbird-tui"; + license = licenses.mit; + mainProgram = "netbird-tui"; + }; + }; + default = netbird-tui; + }); + + overlays.default = final: prev: { + netbird-tui = self.packages.${final.stdenv.hostPlatform.system}.netbird-tui; + }; + }; +} -- cgit v1.3