lol

Merge pull request #227243 from misuzu/netbird-update

netbird: 0.14.6 -> 0.16.0

authored by

Nick Cao and committed by
GitHub
515da5b6 c6e39d87

+56 -35
+3 -2
nixos/modules/services/networking/netbird.nix
··· 41 41 documentation = [ "https://netbird.io/docs/" ]; 42 42 after = [ "network.target" ]; 43 43 wantedBy = [ "multi-user.target" ]; 44 + path = with pkgs; [ 45 + openresolv 46 + ]; 44 47 serviceConfig = { 45 - AmbientCapabilities = [ "CAP_NET_ADMIN" ]; 46 - DynamicUser = true; 47 48 Environment = [ 48 49 "NB_CONFIG=/var/lib/netbird/config.json" 49 50 "NB_LOG_FILE=console"
+53 -33
pkgs/tools/networking/netbird/default.nix
··· 1 - { stdenv, lib, nixosTests, buildGoModule, fetchFromGitHub, installShellFiles 1 + { stdenv 2 + , lib 3 + , nixosTests 4 + , nix-update-script 5 + , buildGoModule 6 + , fetchFromGitHub 7 + , installShellFiles 2 8 , pkg-config 3 - , gtk3, libayatana-appindicator, libX11, libXcursor, libXxf86vm 4 - , Cocoa, IOKit, Kernel, UserNotifications, WebKit 5 - , ui ? false }: 9 + , gtk3 10 + , libayatana-appindicator 11 + , libX11 12 + , libXcursor 13 + , libXxf86vm 14 + , Cocoa 15 + , IOKit 16 + , Kernel 17 + , UserNotifications 18 + , WebKit 19 + , ui ? false 20 + }: 6 21 let 7 - modules = if ui then { 8 - "client/ui" = "netbird-ui"; 9 - } else { 10 - client = "netbird"; 11 - management = "netbird-mgmt"; 12 - signal = "netbird-signal"; 13 - }; 22 + modules = 23 + if ui then { 24 + "client/ui" = "netbird-ui"; 25 + } else { 26 + client = "netbird"; 27 + management = "netbird-mgmt"; 28 + signal = "netbird-signal"; 29 + }; 14 30 in 15 31 buildGoModule rec { 16 32 pname = "netbird"; 17 - version = "0.14.6"; 33 + version = "0.16.0"; 18 34 19 35 src = fetchFromGitHub { 20 36 owner = "netbirdio"; 21 37 repo = pname; 22 38 rev = "v${version}"; 23 - sha256 = "sha256-S11PshEVwOYPb8RGs5joC3Cr8CNKAenK6JRd/oV4LNQ="; 39 + sha256 = "sha256-HtkMwy+8Af69vOz9VYMozOzW/W7CFSXlWR0vLlmYCeY="; 24 40 }; 25 41 26 - vendorHash = "sha256-RyTfEZPwr2CNb9M8vGmo4gtbqQDh2KWApyz2Yx6qPmk="; 42 + vendorHash = "sha256-lag/usfAvpZhWeVe1wB3SJJsTCLcBeh04RvkE803OqQ="; 27 43 28 44 nativeBuildInputs = [ installShellFiles ] ++ lib.optional ui pkg-config; 29 45 ··· 46 62 ldflags = [ 47 63 "-s" 48 64 "-w" 49 - "-X github.com/netbirdio/netbird/client/system.version=${version}" 65 + "-X github.com/netbirdio/netbird/version.version=${version}" 50 66 "-X main.builtBy=nix" 51 67 ]; 52 68 ··· 61 77 --replace 'unix:///var/run/netbird.sock' 'unix:///var/run/netbird/sock' 62 78 ''; 63 79 64 - postInstall = lib.concatStringsSep "\n" (lib.mapAttrsToList 65 - (module: binary: '' 66 - mv $out/bin/${lib.last (lib.splitString "/" module)} $out/bin/${binary} 67 - '' + lib.optionalString (!ui) '' 68 - installShellCompletion --cmd ${binary} \ 69 - --bash <($out/bin/${binary} completion bash) \ 70 - --fish <($out/bin/${binary} completion fish) \ 71 - --zsh <($out/bin/${binary} completion zsh) 72 - '') 73 - modules) + lib.optionalString (stdenv.isLinux && ui) '' 74 - mkdir -p $out/share/pixmaps 75 - cp $src/client/ui/disconnected.png $out/share/pixmaps/netbird.png 80 + postInstall = lib.concatStringsSep "\n" 81 + (lib.mapAttrsToList 82 + (module: binary: '' 83 + mv $out/bin/${lib.last (lib.splitString "/" module)} $out/bin/${binary} 84 + '' + lib.optionalString (!ui) '' 85 + installShellCompletion --cmd ${binary} \ 86 + --bash <($out/bin/${binary} completion bash) \ 87 + --fish <($out/bin/${binary} completion fish) \ 88 + --zsh <($out/bin/${binary} completion zsh) 89 + '') 90 + modules) + lib.optionalString (stdenv.isLinux && ui) '' 91 + mkdir -p $out/share/pixmaps 92 + cp $src/client/ui/disconnected.png $out/share/pixmaps/netbird.png 76 93 77 - mkdir -p $out/share/applications 78 - cp $src/client/ui/netbird.desktop $out/share/applications/netbird.desktop 94 + mkdir -p $out/share/applications 95 + cp $src/client/ui/netbird.desktop $out/share/applications/netbird.desktop 79 96 80 - substituteInPlace $out/share/applications/netbird.desktop \ 81 - --replace "Exec=/usr/bin/netbird-ui" "Exec=$out/bin/netbird-ui" 82 - ''; 97 + substituteInPlace $out/share/applications/netbird.desktop \ 98 + --replace "Exec=/usr/bin/netbird-ui" "Exec=$out/bin/netbird-ui" 99 + ''; 83 100 84 - passthru.tests.netbird = nixosTests.netbird; 101 + passthru = { 102 + tests.netbird = nixosTests.netbird; 103 + updateScript = nix-update-script { }; 104 + }; 85 105 86 106 meta = with lib; { 87 107 homepage = "https://netbird.io";