Merge pull request #43043 from Baughn/nix-df

dwarf-fortress: Fix themes & package Legends Browser
This commit is contained in:
Matthew Bauer 2018-07-04 17:41:06 -04:00 committed by GitHub
commit ea6b31b496
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 33 additions and 3 deletions

View File

@ -29,6 +29,8 @@ let
dwarf-therapist = callPackage ./dwarf-therapist/wrapper.nix { };
legends-browser = callPackage ./legends-browser {};
themes = callPackage ./themes {
stdenv = stdenvNoCC;
};

View File

@ -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;
};
}

View File

@ -17,15 +17,15 @@ let
else theme;
# These are in inverse order for first packages to override the next ones.
pkgs = lib.optional (theme != null) ptheme
++ lib.optional enableDFHack dfhack_
themePkg = lib.optional (theme != null) ptheme;
pkgs = lib.optional enableDFHack dfhack_
++ lib.optional enableSoundSense soundSense
++ [ dwarf-fortress-original ];
env = buildEnv {
name = "dwarf-fortress-env-${dwarf-fortress-original.dfVersion}";
paths = pkgs;
paths = themePkg ++ pkgs;
pathsToLink = [ "/" "/hack" "/hack/scripts" ];
ignoreCollisions = true;