Commit 3288cbdd authored by misuzu's avatar misuzu
Browse files

netbird: 0.14.6 -> 0.16.0

Also add updateScript
parent 9df4441b
Loading
Loading
Loading
Loading
+9 −5
Original line number Diff line number Diff line
{ stdenv
, lib
, nixosTests
, nix-update-script
, buildGoModule
, fetchFromGitHub
, installShellFiles
@@ -29,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;

@@ -61,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"
  ];

@@ -97,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";