Merge pull request #172817 from bdd/zhf-restic-rest-server

main
Ben Siraphob 2 years ago committed by GitHub
commit 64870a95c1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 19
      pkgs/tools/backup/restic/rest-server.nix

@ -1,22 +1,27 @@
{ lib, buildGoModule, fetchFromGitHub }:
{ lib, buildGoModule, fetchFromGitHub, fetchpatch }:
buildGoModule rec {
pname = "restic-rest-server";
version = "0.11.0";
owner = "restic";
repo = "rest-server";
src = fetchFromGitHub {
owner = "restic";
repo = "rest-server";
inherit owner repo;
rev = "v${version}";
hash = "sha256-ninPODztNzvB2js9cuNAuExQLK/OGOu80ZNW0BPrdds=";
};
vendorSha256 = "sha256-8x5qYvIX/C5BaewrTNVbIIadL+7XegbRUZiEDWmJM+c=";
preCheck = ''
substituteInPlace cmd/rest-server/main_test.go \
--replace "/tmp/restic" "/build/restic"
'';
patches = [
(fetchpatch {
name = "backport_rest-server_tests_os.TempDir.patch";
url = "https://github.com/${owner}/${repo}/commit/a87a50ad114bdaddc895413396438df6ea0affbb.patch";
sha256 = "sha256-O6ENxTK2fCVTZZKTFHrvZ+3dT8TbgbIE0o3sYE/RUqc=";
})
];
meta = with lib; {
inherit (src.meta) homepage;

Loading…
Cancel
Save