blob: d5576ccb725e7049945d783cc55490e989acbc10 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
{ fetchzip, lib, stdenv, jdk, runtimeShell, glib, wrapGAppsHook3 }:
stdenv.mkDerivation rec {
version = "5.5.3";
pname = "keystore-explorer";
src = fetchzip {
url = "https://github.com/kaikramer/keystore-explorer/releases/download/v${version}/kse-${lib.replaceStrings ["."] [""] version}.zip";
sha256 = "sha256-oShVfmien4HMpAfSa9rPr18wLu7RN8ZWEZEUtiBHyBs=";
};
# 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;
};
}
|