2022-07-18 16:21:45 +00:00
|
|
|
{ lib
|
2020-04-24 23:36:52 +00:00
|
|
|
, fetchFromGitHub
|
2022-07-18 16:21:45 +00:00
|
|
|
, buildGoModule
|
|
|
|
, gitUpdater
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
2022-06-26 10:26:21 +00:00
|
|
|
buildGoModule rec {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "boulder";
|
2022-07-18 16:21:45 +00:00
|
|
|
version = "2022-07-11";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "letsencrypt";
|
|
|
|
repo = "boulder";
|
2022-07-14 12:49:19 +00:00
|
|
|
rev = "release-${version}";
|
2022-07-18 16:21:45 +00:00
|
|
|
sha256 = "sha256-fDKB7q2e+qdHt+t/BQWX7LkpyiZQtZSHp/x5uv0/c7c=";
|
|
|
|
leaveDotGit = true;
|
|
|
|
postFetch = ''
|
|
|
|
cd $out
|
|
|
|
git rev-parse HEAD > $out/COMMIT
|
|
|
|
find "$out" -name .git -print0 | xargs -0 rm -rf
|
|
|
|
'';
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-06-26 10:26:21 +00:00
|
|
|
vendorSha256 = null;
|
|
|
|
|
|
|
|
subPackages = [ "cmd/boulder" ];
|
|
|
|
|
2022-07-18 16:21:45 +00:00
|
|
|
ldflags = [
|
|
|
|
"-s"
|
|
|
|
"-w"
|
|
|
|
"-X github.com/letsencrypt/boulder/core.BuildHost=nixbld@localhost"
|
|
|
|
];
|
|
|
|
|
|
|
|
preBuild = ''
|
|
|
|
ldflags+=" -X \"github.com/letsencrypt/boulder/core.BuildID=$(cat COMMIT)\""
|
|
|
|
ldflags+=" -X \"github.com/letsencrypt/boulder/core.BuildTime=$(date -u -d @0)\""
|
|
|
|
'';
|
2022-06-26 10:26:21 +00:00
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
for i in $($out/bin/boulder --list); do
|
|
|
|
ln -s $out/bin/boulder $out/bin/$i
|
|
|
|
done
|
|
|
|
'';
|
|
|
|
|
|
|
|
# There are no tests for cmd/boulder.
|
|
|
|
doCheck = false;
|
|
|
|
|
2022-07-18 16:21:45 +00:00
|
|
|
passthru.updateScript = gitUpdater {
|
|
|
|
inherit pname version;
|
|
|
|
rev-prefix = "release-";
|
|
|
|
};
|
|
|
|
|
2022-06-26 10:26:21 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://github.com/letsencrypt/boulder";
|
2022-06-26 10:26:21 +00:00
|
|
|
description = "An ACME-based certificate authority, written in Go";
|
|
|
|
longDescription = ''
|
|
|
|
This is an implementation of an ACME-based CA. The ACME protocol allows
|
|
|
|
the CA to automatically verify that an applicant for a certificate
|
|
|
|
actually controls an identifier, and allows domain holders to issue and
|
|
|
|
revoke certificates for their domains. Boulder is the software that runs
|
|
|
|
Let's Encrypt.
|
|
|
|
'';
|
|
|
|
license = licenses.mpl20;
|
|
|
|
maintainers = with maintainers; [ azahi ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|