4a7f99d55d
Part of: https://github.com/NixOS/nixpkgs/issues/108938 meta = with stdenv.lib; is a widely used pattern. We want to slowly remove the `stdenv.lib` indirection and encourage people to use `lib` directly. Thus let’s start with the meta field. This used a rewriting script to mostly automatically replace all occurances of this pattern, and add the `lib` argument to the package header if it doesn’t exist yet. The script in its current form is available at https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
44 lines
1.1 KiB
Nix
44 lines
1.1 KiB
Nix
{ lib, stdenv, 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 {
|
|
url = "https://github.com/cloudflare/certmgr/pull/51.patch";
|
|
sha256 = "0jhsw159d2mgybvbbn6pmvj4yqr5cwcal5fjwkcn9m4f4zlb6qrs";
|
|
})
|
|
];
|
|
};
|
|
}
|