2020-11-09 15:59:12 +00:00
|
|
|
{ lib, buildGoModule, fetchFromGitHub }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-11-09 15:59:12 +00:00
|
|
|
buildGoModule rec {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "restic-rest-server";
|
2022-03-10 19:12:11 +00:00
|
|
|
version = "0.11.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "restic";
|
|
|
|
repo = "rest-server";
|
|
|
|
rev = "v${version}";
|
2022-03-10 19:12:11 +00:00
|
|
|
hash = "sha256-ninPODztNzvB2js9cuNAuExQLK/OGOu80ZNW0BPrdds=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-03-10 19:12:11 +00:00
|
|
|
vendorSha256 = "sha256-8x5qYvIX/C5BaewrTNVbIIadL+7XegbRUZiEDWmJM+c=";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-11-09 15:59:12 +00:00
|
|
|
preCheck = ''
|
2022-03-10 19:12:11 +00:00
|
|
|
substituteInPlace cmd/rest-server/main_test.go \
|
|
|
|
--replace "/tmp/restic" "/build/restic"
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
inherit (src.meta) homepage;
|
|
|
|
description = "A high performance HTTP server that implements restic's REST backend API";
|
|
|
|
platforms = platforms.unix;
|
|
|
|
license = licenses.bsd2;
|
|
|
|
maintainers = with maintainers; [ dotlambda ];
|
|
|
|
};
|
|
|
|
}
|