2020-10-29 15:37:21 +01:00
|
|
|
{ lib, buildGoModule, fetchFromGitHub }:
|
2018-04-10 11:08:20 +02:00
|
|
|
|
2020-10-29 15:37:21 +01:00
|
|
|
buildGoModule rec {
|
2019-08-15 14:41:18 +02:00
|
|
|
pname = "restic-rest-server";
|
2022-02-19 06:30:36 +01:00
|
|
|
version = "0.11.0";
|
2018-04-10 11:08:20 +02:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "restic";
|
|
|
|
repo = "rest-server";
|
|
|
|
rev = "v${version}";
|
2022-02-19 06:30:36 +01:00
|
|
|
hash = "sha256-ninPODztNzvB2js9cuNAuExQLK/OGOu80ZNW0BPrdds=";
|
2018-04-10 11:08:20 +02:00
|
|
|
};
|
|
|
|
|
2022-02-19 06:30:36 +01:00
|
|
|
vendorSha256 = "sha256-8x5qYvIX/C5BaewrTNVbIIadL+7XegbRUZiEDWmJM+c=";
|
2018-04-10 11:08:20 +02:00
|
|
|
|
2020-10-29 15:37:21 +01:00
|
|
|
preCheck = ''
|
2022-02-19 06:30:36 +01:00
|
|
|
substituteInPlace cmd/rest-server/main_test.go \
|
|
|
|
--replace "/tmp/restic" "/build/restic"
|
2018-04-10 11:08:20 +02: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 ];
|
|
|
|
};
|
|
|
|
}
|