1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-24 06:31:02 +00:00
nixpkgs/pkgs/tools/backup/restic/rest-server.nix
volth 46420bbaa3 treewide: name -> pname (easy cases) (#66585)
treewide replacement of

stdenv.mkDerivation rec {
  name = "*-${version}";
  version = "*";

to pname
2019-08-15 13:41:18 +01:00

33 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 $bin/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 ];
};
}