about summary refs log tree commit diff
path: root/nixpkgs/pkgs/tools/backup/restic/rest-server.nix
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2022-12-06 19:57:55 +0000
committerAlyssa Ross <hi@alyssa.is>2023-02-08 13:48:30 +0000
commitbf3aadfdd39aa197e18bade671fab6726349ffa4 (patch)
tree698567af766ed441d757b57a7b21e68d4a342a2b /nixpkgs/pkgs/tools/backup/restic/rest-server.nix
parentf4afc5a01d9539ce09e47494e679c51f80723d07 (diff)
parent99665eb45f58d959d2cb9e49ddb960c79d596f33 (diff)
downloadnixlib-bf3aadfdd39aa197e18bade671fab6726349ffa4.tar
nixlib-bf3aadfdd39aa197e18bade671fab6726349ffa4.tar.gz
nixlib-bf3aadfdd39aa197e18bade671fab6726349ffa4.tar.bz2
nixlib-bf3aadfdd39aa197e18bade671fab6726349ffa4.tar.lz
nixlib-bf3aadfdd39aa197e18bade671fab6726349ffa4.tar.xz
nixlib-bf3aadfdd39aa197e18bade671fab6726349ffa4.tar.zst
nixlib-bf3aadfdd39aa197e18bade671fab6726349ffa4.zip
Merge commit '99665eb45f58d959d2cb9e49ddb960c79d596f33'
Diffstat (limited to 'nixpkgs/pkgs/tools/backup/restic/rest-server.nix')
-rw-r--r--nixpkgs/pkgs/tools/backup/restic/rest-server.nix14
1 files changed, 9 insertions, 5 deletions
diff --git a/nixpkgs/pkgs/tools/backup/restic/rest-server.nix b/nixpkgs/pkgs/tools/backup/restic/rest-server.nix
index 699343b8728d..0e9a72381ba6 100644
--- a/nixpkgs/pkgs/tools/backup/restic/rest-server.nix
+++ b/nixpkgs/pkgs/tools/backup/restic/rest-server.nix
@@ -1,4 +1,4 @@
-{ lib, buildGoModule, fetchFromGitHub }:
+{ lib, buildGoModule, fetchFromGitHub, fetchpatch }:
 
 buildGoModule rec {
   pname = "restic-rest-server";
@@ -13,10 +13,14 @@ buildGoModule rec {
 
   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/restic/rest-server/commit/a87a50ad114bdaddc895413396438df6ea0affbb.patch";
+      sha256 = "sha256-O6ENxTK2fCVTZZKTFHrvZ+3dT8TbgbIE0o3sYE/RUqc=";
+    })
+
+  ];
 
   meta = with lib; {
     inherit (src.meta) homepage;