From 8dd18c109013d8cb7ffff5ecbf4a13cd6d02f00b Mon Sep 17 00:00:00 2001 From: freezeboy Date: Wed, 8 Jun 2022 14:02:04 +0200 Subject: [PATCH] plik: 1.3.4 -> 1.3.6 --- pkgs/servers/plik/default.nix | 4 ++-- pkgs/servers/plik/programs.nix | 14 ++++++++++---- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/pkgs/servers/plik/default.nix b/pkgs/servers/plik/default.nix index 4572573d16f2..c79a48ad123c 100644 --- a/pkgs/servers/plik/default.nix +++ b/pkgs/servers/plik/default.nix @@ -1,13 +1,13 @@ { lib, fetchurl, makeWrapper, runCommand, callPackage }: let - version = "1.3.4"; + version = "1.3.6"; programs = callPackage ./programs.nix { }; webapp = fetchurl { url = "https://github.com/root-gg/plik/releases/download/${version}/plik-${version}-linux-amd64.tar.gz"; - sha256 = "1qp96va5l0m7jp4g007bhgcpf4ydg3cpg2x9wa9rkpp9k1svdhjy"; + sha256 = "sha256-UGzevhZDfQBoFgPZQIs5Ftgz1cUHGfY/IRSEWQHFVSQ="; }; in diff --git a/pkgs/servers/plik/programs.nix b/pkgs/servers/plik/programs.nix index 40633da7d3fc..5e64f92c52a5 100644 --- a/pkgs/servers/plik/programs.nix +++ b/pkgs/servers/plik/programs.nix @@ -1,13 +1,13 @@ { lib, buildGoModule, fetchFromGitHub, fetchurl, makeWrapper, runCommand }: let - version = "1.3.4"; + version = "1.3.6"; src = fetchFromGitHub { owner = "root-gg"; repo = "plik"; rev = version; - sha256 = "0kmcidnjw26vnxx9h3swcg72i507awg89s4nfxw6rwbyw36iiiqf"; + sha256 = "sha256-Xfk7+60iB5/qJh/6j6AxW0aKXuzdINRfILXRzOFejW4="; }; vendorSha256 = null; @@ -18,12 +18,18 @@ let maintainers = with maintainers; [ freezeboy ]; license = licenses.mit; }; + + postPatch = '' + substituteInPlace server/common/version.go \ + --replace '"0.0.0"' '"${version}"' + ''; + in { plik = buildGoModule { pname = "plik"; - inherit version meta src vendorSha256; + inherit version meta src vendorSha256 postPatch; subPackages = [ "client" ]; postInstall = '' @@ -33,7 +39,7 @@ in plikd-unwrapped = buildGoModule { pname = "plikd-unwrapped"; - inherit version src vendorSha256; + inherit version src vendorSha256 postPatch; subPackages = [ "server" ]; postFixup = ''