Files
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

59 lines
1.5 KiB
Nix

{
fetchzip,
lib,
stdenv,
jdk11,
runtimeShell,
glib,
wrapGAppsHook3,
}:
let
jdk = jdk11;
in
stdenv.mkDerivation rec {
version = "5.6.0";
pname = "keystore-explorer";
src = fetchzip {
url = "https://github.com/kaikramer/keystore-explorer/releases/download/v${version}/kse-${
lib.replaceStrings [ "." ] [ "" ] version
}.zip";
sha256 = "sha256-+ZgALJaZodLmAtdCIE1SG6D0lzlETg4mMPXheXmGhPc=";
};
# glib is necessary so file dialogs don't hang.
buildInputs = [ glib ];
nativeBuildInputs = [ wrapGAppsHook3 ];
installPhase = ''
runHook preInstall
mkdir -p $out/bin
mkdir -p $out/share/keystore-explorer
cp -R icons licenses lib kse.jar $out/share/keystore-explorer/
# keystore-explorer's kse.sh tries to detect the path of Java by using
# Python on Darwin; just write our own start script to avoid unnecessary dependencies
cat > $out/bin/keystore-explorer <<EOF
#!${runtimeShell}
export JAVA_HOME=${jdk.home}
exec ${jdk}/bin/java -jar $out/share/keystore-explorer/kse.jar "\$@"
EOF
chmod +x $out/bin/keystore-explorer
runHook postInstall
'';
dontStrip = true;
dontBuild = true;
dontConfigure = true;
meta = {
description = "Open source GUI replacement for the Java command-line utilities keytool and jarsigner";
mainProgram = "keystore-explorer";
sourceProvenance = with lib.sourceTypes; [ binaryBytecode ];
license = lib.licenses.gpl3Only;
maintainers = [ lib.maintainers.numinit ];
platforms = lib.platforms.unix;
};
}