2024-04-26 20:24:03 +00:00
|
|
|
{ fetchzip, lib, stdenv, jdk, runtimeShell, glib, wrapGAppsHook3 }:
|
2020-08-23 01:12:26 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2023-12-30 06:02:24 +00:00
|
|
|
version = "5.5.3";
|
2020-08-23 01:12:26 +00:00
|
|
|
pname = "keystore-explorer";
|
|
|
|
src = fetchzip {
|
2022-12-27 03:21:21 +00:00
|
|
|
url = "https://github.com/kaikramer/keystore-explorer/releases/download/v${version}/kse-${lib.replaceStrings ["."] [""] version}.zip";
|
2023-12-30 06:02:24 +00:00
|
|
|
sha256 = "sha256-oShVfmien4HMpAfSa9rPr18wLu7RN8ZWEZEUtiBHyBs=";
|
2020-08-23 01:12:26 +00:00
|
|
|
};
|
|
|
|
|
2022-12-27 03:21:21 +00:00
|
|
|
# glib is necessary so file dialogs don't hang.
|
|
|
|
buildInputs = [ glib ];
|
2024-04-26 20:24:03 +00:00
|
|
|
nativeBuildInputs = [ wrapGAppsHook3 ];
|
2022-12-27 03:21:21 +00:00
|
|
|
|
2020-08-23 01:12:26 +00:00
|
|
|
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}
|
2021-09-29 22:52:18 +00:00
|
|
|
export JAVA_HOME=${jdk.home}
|
|
|
|
exec ${jdk}/bin/java -jar $out/share/keystore-explorer/kse.jar "\$@"
|
2020-08-23 01:12:26 +00:00
|
|
|
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";
|
2024-03-19 02:14:51 +00:00
|
|
|
mainProgram = "keystore-explorer";
|
2022-06-02 13:38:41 +00:00
|
|
|
sourceProvenance = with lib.sourceTypes; [ binaryBytecode ];
|
2021-01-15 05:42:41 +00:00
|
|
|
license = lib.licenses.gpl3Only;
|
|
|
|
maintainers = [ lib.maintainers.numinit ];
|
|
|
|
platforms = lib.platforms.unix;
|
2020-08-23 01:12:26 +00:00
|
|
|
};
|
|
|
|
}
|