summary refs log tree commit diff
path: root/pkgs/servers
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/servers')
-rw-r--r--pkgs/servers/hockeypuck/server.nix21
-rw-r--r--pkgs/servers/hockeypuck/sources.nix16
-rw-r--r--pkgs/servers/hockeypuck/web.nix28
3 files changed, 65 insertions, 0 deletions
diff --git a/pkgs/servers/hockeypuck/server.nix b/pkgs/servers/hockeypuck/server.nix
new file mode 100644
index 00000000000..cf48fd5716c
--- /dev/null
+++ b/pkgs/servers/hockeypuck/server.nix
@@ -0,0 +1,21 @@
+{ lib, buildGoModule, fetchFromGitHub, nixosTests }:
+
+let
+  sources = (import ./sources.nix) { inherit fetchFromGitHub; };
+in
+buildGoModule {
+  inherit (sources) pname version src;
+
+  modRoot = "src/hockeypuck/";
+  vendorSha256 = null;
+  doCheck = false; # Uses networking for tests
+
+  passthru.tests = nixosTests.hockeypuck;
+
+  meta = with lib; {
+    description = "OpenPGP Key Server";
+    homepage = "https://github.com/hockeypuck/hockeypuck";
+    license = licenses.agpl3Plus;
+    maintainers = [ maintainers.etu ];
+  };
+}
diff --git a/pkgs/servers/hockeypuck/sources.nix b/pkgs/servers/hockeypuck/sources.nix
new file mode 100644
index 00000000000..b504cd33141
--- /dev/null
+++ b/pkgs/servers/hockeypuck/sources.nix
@@ -0,0 +1,16 @@
+{ fetchFromGitHub }:
+
+let
+  pname = "hockeypuck";
+  version = "2.1.0";
+in
+{
+  inherit version pname;
+
+  src = fetchFromGitHub {
+    owner = pname;
+    repo = pname;
+    rev = version;
+    sha256 = "0da3ffbqck0dr7d89gy2yillp7g9a4ziyjlvrm8vgkkg2fs8dlb1";
+  };
+}
diff --git a/pkgs/servers/hockeypuck/web.nix b/pkgs/servers/hockeypuck/web.nix
new file mode 100644
index 00000000000..32f2b1acd22
--- /dev/null
+++ b/pkgs/servers/hockeypuck/web.nix
@@ -0,0 +1,28 @@
+{ stdenv, lib, fetchFromGitHub, nixosTests }:
+
+let
+  sources = (import ./sources.nix) { inherit fetchFromGitHub; };
+in
+stdenv.mkDerivation {
+  pname = "${sources.pname}-web";
+
+  inherit (sources) version src;
+
+  dontBuild = true; # We should just copy the web templates
+
+  installPhase = ''
+    mkdir -p $out/share/
+
+    cp -vr contrib/webroot $out/share/
+    cp -vr contrib/templates $out/share/
+  '';
+
+  passthru.tests = nixosTests.hockeypuck;
+
+  meta = with lib; {
+    description = "OpenPGP Key Server web resources";
+    homepage = "https://github.com/hockeypuck/hockeypuck";
+    license = licenses.gpl3Plus;
+    maintainers = [ maintainers.etu ];
+  };
+}