Unverified Commit ef0df8fa authored by Peder Bergebakken Sundt's avatar Peder Bergebakken Sundt Committed by GitHub
Browse files

boulder: 0.20251118.0 -> 0.20260331.0; modernize; adopt (#506950)

parents b772782b 98ee7489
Loading
Loading
Loading
Loading
+15 −11
Original line number Diff line number Diff line
@@ -3,19 +3,18 @@
  fetchFromGitHub,
  buildGoModule,
  testers,
  boulder,
  minica,
  nix-update-script,
}:

buildGoModule rec {
buildGoModule (finalAttrs: {
  pname = "boulder";
  version = "0.20251118.0";
  version = "0.20260331.0";

  src = fetchFromGitHub {
    owner = "letsencrypt";
    repo = "boulder";
    tag = "v${version}";
    tag = "v${finalAttrs.version}";
    leaveDotGit = true;
    postFetch = ''
      pushd $out
@@ -23,7 +22,7 @@ buildGoModule rec {
      find $out -name .git -print0 | xargs -0 rm -rf
      popd
    '';
    hash = "sha256-JVkIu8Fh5F8WQXa45I0hnSedAaIQIOFidtWVpVHbAWA=";
    hash = "sha256-2kYZp/cU9OuXmy8EDoX7htqlM7NpAl45Nf2S5MTVn6Y=";
  };

  vendorHash = null;
@@ -35,6 +34,8 @@ buildGoModule rec {

  subPackages = [ "cmd/boulder" ];

  excludedPackages = [ "test/integration" ];

  ldflags = [
    "-s"
    "-w"
@@ -42,10 +43,12 @@ buildGoModule rec {
  ];

  preBuild = ''
    ldflags+=" -X \"github.com/letsencrypt/boulder/core.BuildID=${version} +$(cat COMMIT)\""
    ldflags+=" -X \"github.com/letsencrypt/boulder/core.BuildID=${finalAttrs.version} +$(cat COMMIT)\""
    ldflags+=" -X \"github.com/letsencrypt/boulder/core.BuildTime=$(date -u -d @0)\""
  '';

  __darwinAllowLocalNetworking = true;

  nativeCheckInputs = [ minica ];

  preCheck = ''
@@ -109,6 +112,7 @@ buildGoModule rec {
    "TestCountPendingAuthorizations2"
    "TestCountRegistrationsByIP"
    "TestCountRegistrationsByIPRange"
    "TestCreateAndFetchRegistrations"
    "TestDbSettings"
    "TestDeactivateAccount"
    "TestDeactivateAuthorization"
@@ -325,7 +329,7 @@ buildGoModule rec {
  ];

  checkFlags = [
    "-skip ${lib.strings.concatStringsSep "|" disabledTests}"
    "-skip ${lib.strings.concatStringsSep "|" finalAttrs.disabledTests}"
  ];

  postInstall = ''
@@ -336,8 +340,8 @@ buildGoModule rec {

  passthru = {
    tests.version = testers.testVersion {
      package = boulder;
      inherit version;
      package = finalAttrs.finalPackage;
      version = finalAttrs.version;
    };
    updateScript = nix-update-script { };
  };
@@ -354,6 +358,6 @@ buildGoModule rec {
    '';
    license = lib.licenses.mpl20;
    mainProgram = "boulder";
    maintainers = [ ];
    maintainers = with lib.maintainers; [ miniharinn ];
  };
}
})