From c8095af0cd0f005f802f952eaf9666b3d92475e9 Mon Sep 17 00:00:00 2001 From: Svein Ove Aas Date: Wed, 4 Jul 2018 21:04:19 +0100 Subject: [PATCH] dwarf-fortress: Init Legends Browser at 1.17.1 --- pkgs/games/dwarf-fortress/default.nix | 2 ++ .../legends-browser/default.nix | 28 +++++++++++++++++++ 2 files changed, 30 insertions(+) create mode 100644 pkgs/games/dwarf-fortress/legends-browser/default.nix diff --git a/pkgs/games/dwarf-fortress/default.nix b/pkgs/games/dwarf-fortress/default.nix index ee2e442daa2..a79f74bd4a3 100644 --- a/pkgs/games/dwarf-fortress/default.nix +++ b/pkgs/games/dwarf-fortress/default.nix @@ -32,6 +32,8 @@ let dwarf-therapist = callPackage ./dwarf-therapist/wrapper.nix { }; + legends-browser = callPackage ./legends-browser {}; + themes = callPackage ./themes { stdenv = stdenvNoCC; }; diff --git a/pkgs/games/dwarf-fortress/legends-browser/default.nix b/pkgs/games/dwarf-fortress/legends-browser/default.nix new file mode 100644 index 00000000000..06a40bb85c9 --- /dev/null +++ b/pkgs/games/dwarf-fortress/legends-browser/default.nix @@ -0,0 +1,28 @@ +{ stdenv, fetchurl, jre }: + +stdenv.mkDerivation rec { + name = "legends-browser-${version}"; + version = "1.17.1"; + + src = fetchurl { + url = "https://github.com/robertjanetzko/LegendsBrowser/releases/download/${version}/legendsbrowser-${version}.jar"; + sha256 = "05b4ksbl4481rh3ykfirbp6wvxhppcd5mvclhn9995gsrcaj8gx9"; + }; + + unpackPhase = "true"; + + installPhase = '' + mkdir -p $out/bin + ln -s $src $out/legends-browser.jar + echo "${jre}/bin/java -jar $out/legends-browser.jar" > $out/bin/legends-browser + chmod a+x $out/bin/legends-browser + ''; + + meta = with stdenv.lib; { + description = "A multi-platform, open source, java-based legends viewer for dwarf fortress"; + maintainers = with maintainers; [ Baughn ]; + license = licenses.mit; + platforms = platforms.all; + homepage = https://github.com/robertjanetzko/LegendsBrowser; + }; +}