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
|
2022-09-09 14:08:57 +00:00
|
|
|
, testers
|
|
|
|
, boulder
|
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-10-06 18:32:54 +00:00
|
|
|
version = "2022-09-29";
|
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
|
|
|
leaveDotGit = true;
|
|
|
|
postFetch = ''
|
|
|
|
cd $out
|
2022-09-09 14:08:57 +00:00
|
|
|
git rev-parse --short=8 HEAD 2>/dev/null >$out/COMMIT
|
2022-07-18 16:21:45 +00:00
|
|
|
find "$out" -name .git -print0 | xargs -0 rm -rf
|
|
|
|
'';
|
2022-10-06 18:32:54 +00:00
|
|
|
hash = "sha256-MyJHTkt4qEHwD1UOkOfDNhNddcyFHPJvDzoT7kJ2qi4=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-09-09 14:08:57 +00:00
|
|
|
vendorHash = null;
|
2022-06-26 10:26:21 +00:00
|
|
|
|
|
|
|
subPackages = [ "cmd/boulder" ];
|
|
|
|
|
2022-09-09 14:08:57 +00:00
|
|
|
patches = [ ./no-build-id-test.patch ];
|
|
|
|
|
2022-07-18 16:21:45 +00:00
|
|
|
ldflags = [
|
|
|
|
"-s"
|
|
|
|
"-w"
|
|
|
|
"-X github.com/letsencrypt/boulder/core.BuildHost=nixbld@localhost"
|
|
|
|
];
|
|
|
|
|
|
|
|
preBuild = ''
|
2022-09-09 14:08:57 +00:00
|
|
|
ldflags+=" -X \"github.com/letsencrypt/boulder/core.BuildID=${src.rev} +$(cat COMMIT)\""
|
2022-07-18 16:21:45 +00:00
|
|
|
ldflags+=" -X \"github.com/letsencrypt/boulder/core.BuildTime=$(date -u -d @0)\""
|
|
|
|
'';
|
2022-06-26 10:26:21 +00:00
|
|
|
|
2022-09-09 14:08:57 +00:00
|
|
|
preCheck = ''
|
|
|
|
# Test all targets.
|
|
|
|
unset subPackages
|
|
|
|
|
|
|
|
# Disable tests that require additional services.
|
|
|
|
rm -rf \
|
|
|
|
cmd/admin-revoker/main_test.go \
|
|
|
|
cmd/bad-key-revoker/main_test.go \
|
|
|
|
cmd/cert-checker/main_test.go \
|
|
|
|
cmd/contact-auditor/main_test.go \
|
|
|
|
cmd/expiration-mailer/main_test.go \
|
|
|
|
cmd/expiration-mailer/send_test.go \
|
|
|
|
cmd/id-exporter/main_test.go \
|
|
|
|
cmd/rocsp-tool/client_test.go \
|
|
|
|
db/map_test.go \
|
|
|
|
db/multi_test.go \
|
|
|
|
db/rollback_test.go \
|
|
|
|
log/log_test.go \
|
|
|
|
ocsp/updater/updater_test.go \
|
|
|
|
ra/ra_test.go \
|
|
|
|
rocsp/rocsp_test.go \
|
|
|
|
sa/database_test.go \
|
|
|
|
sa/model_test.go \
|
|
|
|
sa/precertificates_test.go \
|
|
|
|
sa/rate_limits_test.go \
|
|
|
|
sa/sa_test.go \
|
|
|
|
test/load-generator/acme/directory_test.go \
|
|
|
|
va/caa_test.go \
|
|
|
|
va/dns_test.go \
|
|
|
|
va/http_test.go \
|
|
|
|
va/tlsalpn_test.go \
|
|
|
|
va/va_test.go
|
|
|
|
'';
|
|
|
|
|
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
|
|
|
|
'';
|
|
|
|
|
2022-09-09 14:08:57 +00:00
|
|
|
passthru.tests.version = testers.testVersion {
|
|
|
|
package = boulder;
|
|
|
|
command = "boulder --version";
|
|
|
|
inherit version;
|
2022-07-18 16:21:45 +00:00
|
|
|
};
|
|
|
|
|
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";
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "ACME-based certificate authority, written in Go";
|
2022-06-26 10:26:21 +00:00
|
|
|
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
|
|
|
};
|
|
|
|
}
|