Unverified Commit 5ecdf2b6 authored by Emily Trau's avatar Emily Trau Committed by GitHub
Browse files

Merge pull request #271299 from pbsds/fix-certmgr-selfsigned-1701382648

certmgr: 1.6.4 -> 3.0.3, migrate to buildGoModule and by-name
parents 0da4150a 32917e04
Loading
Loading
Loading
Loading
+28 −0
Original line number Diff line number Diff line
{ lib
, buildGoModule
, fetchFromGitHub
}:

buildGoModule rec {
  pname = "certmgr";
  version = "3.0.3";

  src = fetchFromGitHub {
    owner = "cloudflare";
    repo = "certmgr";
    rev = "v${version}";
    hash = "sha256-MgNPU06bv31tdfUnigcmct8UTVztNLXcmTg3H/J7mic=";
  };

  vendorHash = null;

  ldflags = [ "-s" "-w" ];

  meta = with lib; {
    homepage = "https://cfssl.org/";
    description = "Cloudflare's automated certificate management using a CFSSL CA";
    platforms = platforms.linux;
    license = licenses.bsd2;
    maintainers = with maintainers; [ johanot srhb ];
  };
}
+0 −45
Original line number Diff line number Diff line
{ lib, buildGoPackage, fetchFromGitHub, fetchpatch }:

let
  generic = { patches ? [] }:
    buildGoPackage rec {
      version = "1.6.4";
      pname = "certmgr";

      goPackagePath = "github.com/cloudflare/certmgr/";

      src = fetchFromGitHub {
        owner = "cloudflare";
        repo = "certmgr";
        rev = "v${version}";
        sha256 = "0glvyp61ya21pdm2bsvq3vfhmmxc2998vxc6hiyc79ijsv9n6jqi";
      };

      inherit patches;

      meta = with lib; {
        homepage = "https://cfssl.org/";
        description = "Cloudflare's certificate manager";
        platforms = platforms.linux;
        license = licenses.bsd2;
        maintainers = with maintainers; [ johanot srhb ];
      };
    };
in
{
  certmgr = generic {};

  certmgr-selfsigned = generic {
    # The following patch makes it possible to use a self-signed x509 cert
    # for the cfssl apiserver.
    # TODO: remove patch when PR is merged.
    patches = [
      (fetchpatch {
        # https://github.com/cloudflare/certmgr/pull/51
        name   = "cloudflare-certmgr-pull-51.patch";
        url    = "https://github.com/cloudflare/certmgr/compare/232e0adf8379db28ab74c46e0dd3eddb3cd8f2ea...55c595a4a2dc871726b3c8337469daf5597718a3.patch";
        sha256 = "0jhsw159d2mgybvbbn6pmvj4yqr5cwcal5fjwkcn9m4f4zlb6qrs";
      })
    ];
  };
}
+1 −0
Original line number Diff line number Diff line
@@ -137,6 +137,7 @@ mapAliases ({
  catfish = throw "'catfish' has been renamed to/replaced by 'xfce.catfish'"; # Converted to throw 2023-09-10
  cawbird = throw "cawbird has been abandoned upstream and is broken anyways due to Twitter closing its API";
  ccloud-cli = throw "ccloud-cli has been removed, please use confluent-cli instead"; # Added 2023-06-09
  certmgr-selfsigned = certmgr; # Added 2023-11-30
  chefdk = throw "chefdk has been removed due to being deprecated upstream by Chef Workstation"; # Added 2023-03-22
  chocolateDoom = chocolate-doom; # Added 2023-05-01
  chrome-gnome-shell = gnome-browser-connector; # Added 2022-07-27
+0 −3
Original line number Diff line number Diff line
@@ -6803,9 +6803,6 @@ with pkgs;
    ceph-client;
  ceph-dev = ceph;
  inherit (callPackages ../tools/security/certmgr { })
    certmgr certmgr-selfsigned;
  cfdg = callPackage ../tools/graphics/cfdg { };
  cglm = callPackage ../development/libraries/cglm { };