mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-09-22 21:18:28 +03:00
Merge pull request #227243 from misuzu/netbird-update
netbird: 0.14.6 -> 0.16.0
This commit is contained in:
commit
515da5b664
@ -41,9 +41,10 @@ in {
|
||||
documentation = [ "https://netbird.io/docs/" ];
|
||||
after = [ "network.target" ];
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
path = with pkgs; [
|
||||
openresolv
|
||||
];
|
||||
serviceConfig = {
|
||||
AmbientCapabilities = [ "CAP_NET_ADMIN" ];
|
||||
DynamicUser = true;
|
||||
Environment = [
|
||||
"NB_CONFIG=/var/lib/netbird/config.json"
|
||||
"NB_LOG_FILE=console"
|
||||
|
@ -1,10 +1,26 @@
|
||||
{ stdenv, lib, nixosTests, buildGoModule, fetchFromGitHub, installShellFiles
|
||||
{ stdenv
|
||||
, lib
|
||||
, nixosTests
|
||||
, nix-update-script
|
||||
, buildGoModule
|
||||
, fetchFromGitHub
|
||||
, installShellFiles
|
||||
, pkg-config
|
||||
, gtk3, libayatana-appindicator, libX11, libXcursor, libXxf86vm
|
||||
, Cocoa, IOKit, Kernel, UserNotifications, WebKit
|
||||
, ui ? false }:
|
||||
, gtk3
|
||||
, libayatana-appindicator
|
||||
, libX11
|
||||
, libXcursor
|
||||
, libXxf86vm
|
||||
, Cocoa
|
||||
, IOKit
|
||||
, Kernel
|
||||
, UserNotifications
|
||||
, WebKit
|
||||
, ui ? false
|
||||
}:
|
||||
let
|
||||
modules = if ui then {
|
||||
modules =
|
||||
if ui then {
|
||||
"client/ui" = "netbird-ui";
|
||||
} else {
|
||||
client = "netbird";
|
||||
@ -14,16 +30,16 @@ let
|
||||
in
|
||||
buildGoModule rec {
|
||||
pname = "netbird";
|
||||
version = "0.14.6";
|
||||
version = "0.16.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "netbirdio";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-S11PshEVwOYPb8RGs5joC3Cr8CNKAenK6JRd/oV4LNQ=";
|
||||
sha256 = "sha256-HtkMwy+8Af69vOz9VYMozOzW/W7CFSXlWR0vLlmYCeY=";
|
||||
};
|
||||
|
||||
vendorHash = "sha256-RyTfEZPwr2CNb9M8vGmo4gtbqQDh2KWApyz2Yx6qPmk=";
|
||||
vendorHash = "sha256-lag/usfAvpZhWeVe1wB3SJJsTCLcBeh04RvkE803OqQ=";
|
||||
|
||||
nativeBuildInputs = [ installShellFiles ] ++ lib.optional ui pkg-config;
|
||||
|
||||
@ -46,7 +62,7 @@ buildGoModule rec {
|
||||
ldflags = [
|
||||
"-s"
|
||||
"-w"
|
||||
"-X github.com/netbirdio/netbird/client/system.version=${version}"
|
||||
"-X github.com/netbirdio/netbird/version.version=${version}"
|
||||
"-X main.builtBy=nix"
|
||||
];
|
||||
|
||||
@ -61,7 +77,8 @@ buildGoModule rec {
|
||||
--replace 'unix:///var/run/netbird.sock' 'unix:///var/run/netbird/sock'
|
||||
'';
|
||||
|
||||
postInstall = lib.concatStringsSep "\n" (lib.mapAttrsToList
|
||||
postInstall = lib.concatStringsSep "\n"
|
||||
(lib.mapAttrsToList
|
||||
(module: binary: ''
|
||||
mv $out/bin/${lib.last (lib.splitString "/" module)} $out/bin/${binary}
|
||||
'' + lib.optionalString (!ui) ''
|
||||
@ -81,7 +98,10 @@ buildGoModule rec {
|
||||
--replace "Exec=/usr/bin/netbird-ui" "Exec=$out/bin/netbird-ui"
|
||||
'';
|
||||
|
||||
passthru.tests.netbird = nixosTests.netbird;
|
||||
passthru = {
|
||||
tests.netbird = nixosTests.netbird;
|
||||
updateScript = nix-update-script { };
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://netbird.io";
|
||||
|
Loading…
Reference in New Issue
Block a user