1 { lib, stdenv, fetchurl, copyDesktopItems, makeDesktopItem, unzip, jre8
5 stdenv.mkDerivation rec {
10 url = "https://github.com/fleneindre/fleneindre.github.io/raw/master/downloads/JQuake_${version}_linux.zip";
11 sha256 = "sha256-Q9R5Qhk8Qodw2d99nL2aG5WGpIyvKmjzfkRK7xJzoc0=";
14 nativeBuildInputs = [ unzip copyDesktopItems ];
19 # JQuake emits a lot of debug-like messages on stdout. Either drop the output
20 # stream entirely or log them at 'user.debug' level.
21 sed -i "/^java/ s/$/ ${if logOutput then "| logger -p user.debug" else "> \\/dev\\/null"}/" JQuake.sh
23 # By default, an 'errors.log' file is created in the current directory.
24 # cd into a temporary directory and let it be created there.
25 substituteInPlace JQuake.sh \
26 --replace "java -jar " "exec ${jre8.outPath}/bin/java -jar $out/lib/" \
27 --replace "[JAR FOLDER]" "\$(mktemp -p /tmp -d jquake-errlog-XXX)"
38 mkdir -p $out/{bin,lib}
39 mv JQuake.sh $out/bin/JQuake
40 mv {JQuake.jar,JQuake_lib} $out/lib
43 mkdir -p $out/share/licenses/jquake
44 mv LICENSE* $out/share/licenses/jquake
52 desktopName = "JQuake";
54 comment = "Real-time earthquake map of Japan";
59 description = "Real-time earthquake map of Japan";
60 homepage = "https://jquake.net";
61 downloadPage = "https://jquake.net/en/terms.html?os=linux&arch=any";
62 changelog = "https://jquake.net/en/changelog.html";
63 maintainers = with maintainers; [ nessdoor ];
64 sourceProvenance = with sourceTypes; [ binaryBytecode ];
65 license = licenses.unfree;
66 platforms = platforms.linux;
67 mainProgram = "JQuake";