fork
Configure Feed
Select the types of activity you want to include in your feed.
nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
fork
Configure Feed
Select the types of activity you want to include in your feed.
1{
2 lib,
3 maven,
4 fetchFromGitHub,
5 buildGraalvmNativeImage,
6}:
7
8buildGraalvmNativeImage (finalAttrs: {
9 pname = "certificate-ripper";
10 version = "2.4.1";
11
12 src = maven.buildMavenPackage {
13 pname = "certificate-ripper-jar";
14 inherit (finalAttrs) version;
15
16 src = fetchFromGitHub {
17 owner = "Hakky54";
18 repo = "certificate-ripper";
19 tag = finalAttrs.version;
20 hash = "sha256-qQ5BHH+DT1sGNDGzSbclqc6+byBxyP16qvm3k9E/Yks=";
21 };
22
23 patches = [
24 ./pin-default-maven-plguin-versions.patch
25 ./fix-test-temp-dir-path.patch
26 ];
27
28 mvnHash = "sha256-G2+Z1JyxTzCZzWjB8MQH1T9kwHjtRPag+bmzGXpQXw4=";
29
30 mvnParameters =
31 let
32 disabledTests = [
33 "PemExportCommandShould#resolveRootCaOnlyWhenEnabled" # uses network
34 "DerExportCommandShould#processSystemTrustedCertificates"
35 "JksExportCommandShould#processSystemTrustedCertificates"
36 "PemExportCommandShould#processSystemTrustedCertificates"
37 "Pkcs12ExportCommandShould#processSystemTrustedCertificates"
38 ];
39 in
40 lib.escapeShellArgs [
41 "-Dproject.build.outputTimestamp=1980-01-01T00:00:02Z" # make timestamp deterministic
42 "-Dtest=${lib.concatMapStringsSep "," (t: "!" + t) disabledTests}"
43 ];
44
45 installPhase = ''
46 install -Dm644 target/crip.jar $out
47 '';
48 };
49
50 # Copied from pom.xml
51 extraNativeImageBuildArgs = [
52 "--no-fallback"
53 "-H:EnableURLProtocols=https"
54 "-H:EnableURLProtocols=http"
55 ];
56
57 meta = {
58 changelog = "https://github.com/Hakky54/certificate-ripper/releases/tag/${finalAttrs.version}";
59 description = "CLI tool to extract server certificates";
60 homepage = "https://github.com/Hakky54/certificate-ripper";
61 license = lib.licenses.asl20;
62 maintainers = with lib.maintainers; [ tomasajt ];
63 mainProgram = "crip";
64 };
65})