nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at netboot-syslinux-multiplatform 45 lines 1.5 kB view raw
1{ fetchzip, lib, stdenv, jdk, runtimeShell, glib, wrapGAppsHook }: 2 3stdenv.mkDerivation rec { 4 version = "5.5.2"; 5 pname = "keystore-explorer"; 6 src = fetchzip { 7 url = "https://github.com/kaikramer/keystore-explorer/releases/download/v${version}/kse-${lib.replaceStrings ["."] [""] version}.zip"; 8 sha256 = "sha256-mDi/TSYumCg2hAnMOI2QpdAOSlDMpdJPqzatFotAqUk="; 9 }; 10 11 # glib is necessary so file dialogs don't hang. 12 buildInputs = [ glib ]; 13 nativeBuildInputs = [ wrapGAppsHook ]; 14 15 installPhase = '' 16 runHook preInstall 17 18 mkdir -p $out/bin 19 mkdir -p $out/share/keystore-explorer 20 cp -R icons licenses lib kse.jar $out/share/keystore-explorer/ 21 22 # keystore-explorer's kse.sh tries to detect the path of Java by using 23 # Python on Darwin; just write our own start script to avoid unnecessary dependencies 24 cat > $out/bin/keystore-explorer <<EOF 25 #!${runtimeShell} 26 export JAVA_HOME=${jdk.home} 27 exec ${jdk}/bin/java -jar $out/share/keystore-explorer/kse.jar "\$@" 28 EOF 29 chmod +x $out/bin/keystore-explorer 30 31 runHook postInstall 32 ''; 33 34 dontStrip = true; 35 dontBuild = true; 36 dontConfigure = true; 37 38 meta = { 39 description = "Open source GUI replacement for the Java command-line utilities keytool and jarsigner"; 40 sourceProvenance = with lib.sourceTypes; [ binaryBytecode ]; 41 license = lib.licenses.gpl3Only; 42 maintainers = [ lib.maintainers.numinit ]; 43 platforms = lib.platforms.unix; 44 }; 45}