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