aboutsummaryrefslogtreecommitdiff
path: root/infra/libkookie/nixpkgs/pkgs/tools/backup/restic/rest-server.nix
diff options
context:
space:
mode:
Diffstat (limited to 'infra/libkookie/nixpkgs/pkgs/tools/backup/restic/rest-server.nix')
-rw-r--r--infra/libkookie/nixpkgs/pkgs/tools/backup/restic/rest-server.nix32
1 files changed, 32 insertions, 0 deletions
diff --git a/infra/libkookie/nixpkgs/pkgs/tools/backup/restic/rest-server.nix b/infra/libkookie/nixpkgs/pkgs/tools/backup/restic/rest-server.nix
new file mode 100644
index 000000000000..45a4df74b15d
--- /dev/null
+++ b/infra/libkookie/nixpkgs/pkgs/tools/backup/restic/rest-server.nix
@@ -0,0 +1,32 @@
+{ 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 ];
+ };
+}