2021-03-04 12:54:50 +00:00
|
|
|
{ lib, buildEnv, writeShellScriptBin, fetchurl, jre }:
|
2018-07-04 20:04:19 +00:00
|
|
|
|
2018-07-04 23:06:00 +00:00
|
|
|
let
|
2018-07-04 20:04:19 +00:00
|
|
|
name = "legends-browser-${version}";
|
|
|
|
version = "1.17.1";
|
|
|
|
|
2018-07-04 23:06:00 +00:00
|
|
|
jar = fetchurl {
|
2018-07-04 20:04:19 +00:00
|
|
|
url = "https://github.com/robertjanetzko/LegendsBrowser/releases/download/${version}/legendsbrowser-${version}.jar";
|
|
|
|
sha256 = "05b4ksbl4481rh3ykfirbp6wvxhppcd5mvclhn9995gsrcaj8gx9";
|
|
|
|
};
|
2021-01-19 21:20:11 +00:00
|
|
|
|
2018-07-04 23:06:00 +00:00
|
|
|
script = writeShellScriptBin "legends-browser" ''
|
|
|
|
set -eu
|
|
|
|
BASE="$HOME/.local/share/df_linux/legends-browser/"
|
|
|
|
mkdir -p "$BASE"
|
|
|
|
cd "$BASE"
|
|
|
|
if [[ ! -e legendsbrowser.properties ]]; then
|
|
|
|
echo 'Creating initial configuration for legends-browser'
|
|
|
|
echo "last=$(cd ..; pwd)" > legendsbrowser.properties
|
|
|
|
fi
|
|
|
|
${jre}/bin/java -jar ${jar}
|
2018-07-04 20:04:19 +00:00
|
|
|
'';
|
2018-07-04 23:06:00 +00:00
|
|
|
in
|
|
|
|
|
|
|
|
buildEnv {
|
|
|
|
inherit name;
|
|
|
|
paths = [ script ];
|
2018-07-04 20:04:19 +00:00
|
|
|
|
2021-01-17 13:51:41 +00:00
|
|
|
meta = with lib; {
|
2018-07-04 20:04:19 +00:00
|
|
|
description = "Multi-platform, open source, java-based legends viewer for dwarf fortress";
|
|
|
|
maintainers = with maintainers; [ Baughn ];
|
2022-06-02 13:38:41 +00:00
|
|
|
sourceProvenance = with sourceTypes; [ binaryBytecode ];
|
2018-07-04 20:04:19 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
platforms = platforms.all;
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://github.com/robertjanetzko/LegendsBrowser";
|
2018-07-04 20:04:19 +00:00
|
|
|
};
|
|
|
|
}
|