depot/third_party/nixpkgs/pkgs/tools/backup/restic/rest-server.nix
Default email 66604c92c1 Project import generated by Copybara.
GitOrigin-RevId: 32b8ed738096bafb4cdb7f70347a0f63f9f40151
2020-05-15 23:57:56 +02:00

32 lines
751 B
Nix

{ lib, buildGoPackage, fetchFromGitHub }:
buildGoPackage rec {
pname = "restic-rest-server";
version = "0.9.7";
goPackagePath = "github.com/restic/rest-server";
src = fetchFromGitHub {
owner = "restic";
repo = "rest-server";
rev = "v${version}";
sha256 = "1g47ly1pxwn0znbj3v5j6kqhn66d4wf0d5gjqzig75pzknapv8qj";
};
buildPhase = ''
cd go/src/${goPackagePath}
go run build.go
'';
installPhase = ''
install -Dt $out/bin rest-server
'';
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 ];
};
}