nixpkgs/pkgs/by-name/ce/certificate-ripper/package.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

62 lines
1.5 KiB
Nix
Raw Normal View History

2023-12-23 12:57:04 +00:00
{ lib
, maven
, fetchFromGitHub
, buildGraalvmNativeImage
}:
let
pname = "certificate-ripper";
2024-02-19 20:00:38 +00:00
version = "2.3.0";
2023-12-23 12:57:04 +00:00
jar = maven.buildMavenPackage {
pname = "${pname}-jar";
inherit version;
src = fetchFromGitHub {
owner = "Hakky54";
repo = "certificate-ripper";
rev = version;
2024-02-19 20:00:38 +00:00
hash = "sha256-q/UhKLFAre3YUH2W7e+SH4kRM0GIZAUyNJFDm02eL+8=";
2023-12-23 12:57:04 +00:00
};
patches = [
2024-02-19 20:00:38 +00:00
./pin-default-maven-plguin-versions.patch
2023-12-23 12:57:04 +00:00
./fix-test-temp-dir-path.patch
];
2024-02-19 20:00:38 +00:00
mvnHash = "sha256-/iy7DXBAyq8TIpvrd2WAQh+9OApfxCWo1NoGwbzbq7s=";
mvnParameters = lib.escapeShellArgs [
"-Dproject.build.outputTimestamp=1980-01-01T00:00:02Z" # make timestamp deterministic
"-Dtest=!PemExportCommandShould#resolveRootCaOnlyWhenEnabled" # disable test using network
];
2023-12-23 12:57:04 +00:00
installPhase = ''
install -Dm644 target/crip.jar $out
'';
};
in
buildGraalvmNativeImage {
inherit pname version;
src = jar;
executable = "crip";
# Copied from pom.xml
extraNativeImageBuildArgs = [
"--no-fallback"
"-H:ReflectionConfigurationResources=graalvm_config.json"
"-H:EnableURLProtocols=https"
"-H:EnableURLProtocols=http"
];
meta = {
changelog = "https://github.com/Hakky54/certificate-ripper/releases/tag/${version}";
description = "CLI tool to extract server certificates";
homepage = "https://github.com/Hakky54/certificate-ripper";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ tomasajt ];
};
}