summary refs log tree commit diff
diff options
context:
space:
mode:
authorThomas Gerbet <thomas@gerbet.me>2021-03-27 17:16:20 +0100
committerThomas Gerbet <thomas@gerbet.me>2021-03-27 23:40:46 +0100
commit8460e643b82ef6da409e36afd2226b3cafb1c7d8 (patch)
treeb0f9049f7347cc74d9aa7eac5d19a96ef2c810ca
parent727fa99a646ea9918c3db5e99857eee8b2d8a97c (diff)
downloadnixpkgs-8460e643b82ef6da409e36afd2226b3cafb1c7d8.tar
nixpkgs-8460e643b82ef6da409e36afd2226b3cafb1c7d8.tar.gz
nixpkgs-8460e643b82ef6da409e36afd2226b3cafb1c7d8.tar.bz2
nixpkgs-8460e643b82ef6da409e36afd2226b3cafb1c7d8.tar.lz
nixpkgs-8460e643b82ef6da409e36afd2226b3cafb1c7d8.tar.xz
nixpkgs-8460e643b82ef6da409e36afd2226b3cafb1c7d8.tar.zst
nixpkgs-8460e643b82ef6da409e36afd2226b3cafb1c7d8.zip
rekor-server: init at 0.1.1
-rw-r--r--pkgs/tools/security/rekor/default.nix64
-rw-r--r--pkgs/top-level/all-packages.nix4
2 files changed, 45 insertions, 23 deletions
diff --git a/pkgs/tools/security/rekor/default.nix b/pkgs/tools/security/rekor/default.nix
index a1470e78058..b260d46f934 100644
--- a/pkgs/tools/security/rekor/default.nix
+++ b/pkgs/tools/security/rekor/default.nix
@@ -1,31 +1,51 @@
 { lib, buildGoModule, fetchFromGitHub }:
 
-buildGoModule rec {
-  pname = "rekor-cli";
-  version = "0.1.1";
+let
+  generic = { pname, subPackages, description, postInstall }:
+    buildGoModule rec {
+      inherit pname;
+      version = "0.1.1";
 
-  src = fetchFromGitHub {
-    owner = "sigstore";
-    repo = "rekor";
-    rev = "v${version}";
-    sha256 = "1hvkfvc747g5r4h8vb1d8ikqxmlyxsycnlh78agmmjpxlasspmbk";
-  };
-
-  vendorSha256 = "0vdir9ia3hv27rkm6jnvhsfc3mxw36xfvwqnfd34rgzmzcfxlrbv";
+      src = fetchFromGitHub {
+        owner = "sigstore";
+        repo = "rekor";
+        rev = "v${version}";
+        sha256 = "1hvkfvc747g5r4h8vb1d8ikqxmlyxsycnlh78agmmjpxlasspmbk";
+      };
 
-  subPackages = [ "cmd/cli" ];
+      vendorSha256 = "0vdir9ia3hv27rkm6jnvhsfc3mxw36xfvwqnfd34rgzmzcfxlrbv";
 
-  # Will not be needed with the next version as the package as been renamed upstream
-  postInstall = ''
-    if [ -f "$out/bin/cli" ]; then
-      mv "$out/bin/cli" "$out/bin/rekor-client"
-    fi
-  '';
+      inherit subPackages postInstall;
 
-  meta = with lib; {
+      meta = with lib; {
+        inherit description;
+        homepage = "https://github.com/sigstore/rekor";
+        changelog = "https://github.com/sigstore/rekor/releases/tag/v${version}";
+        license = licenses.asl20;
+        maintainers = with maintainers; [ lesuisse ];
+      };
+    };
+in {
+  rekor-cli = generic {
+    pname = "rekor-cli";
+    subPackages = [ "cmd/cli" ];
+    # Will not be needed with the next version, the package as been renamed upstream
+    postInstall = ''
+      if [ -f "$out/bin/cli" ]; then
+        mv "$out/bin/cli" "$out/bin/rekor-client"
+      fi
+    '';
     description = "CLI client for Sigstore, the Signature Transparency Log";
-    homepage = "https://github.com/sigstore/rekor";
-    license = licenses.asl20;
-    maintainers = with maintainers; [ lesuisse ];
+  };
+  rekor-server = generic {
+    pname = "rekor-server";
+    subPackages = [ "cmd/server" ];
+    # Will not be needed with the next version, the package as been renamed upstream
+    postInstall = ''
+      if [ -f "$out/bin/server" ]; then
+        mv "$out/bin/server" "$out/bin/rekor-server"
+      fi
+    '';
+    description = "Sigstore server, the Signature Transparency Log";
   };
 }
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index ac0083ceac1..ff4bdd40e86 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -7679,7 +7679,9 @@ in
 
   retext = libsForQt5.callPackage ../applications/editors/retext { };
 
-  rekor-cli = callPackage ../tools/security/rekor { };
+  inherit (callPackage ../tools/security/rekor { })
+    rekor-cli
+    rekor-server;
 
   richgo = callPackage ../development/tools/richgo {  };