diff options
author | Matthew Bauer <mjbauer95@gmail.com> | 2018-07-04 17:41:06 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-07-04 17:41:06 -0400 |
commit | ea6b31b4968be27691b32b932c1c6e77aee6780b (patch) | |
tree | 1819bcfd2e30d987f52f2bd728c717595998c3cd /pkgs/games/dwarf-fortress | |
parent | 04bd737062086e9319c6dbcc3174fcbb7076fede (diff) | |
parent | c8095af0cd0f005f802f952eaf9666b3d92475e9 (diff) |
Merge pull request #43043 from Baughn/nix-df
dwarf-fortress: Fix themes & package Legends Browser
Diffstat (limited to 'pkgs/games/dwarf-fortress')
-rw-r--r-- | pkgs/games/dwarf-fortress/default.nix | 2 | ||||
-rw-r--r-- | pkgs/games/dwarf-fortress/legends-browser/default.nix | 28 | ||||
-rw-r--r-- | pkgs/games/dwarf-fortress/wrapper/default.nix | 6 |
3 files changed, 33 insertions, 3 deletions
diff --git a/pkgs/games/dwarf-fortress/default.nix b/pkgs/games/dwarf-fortress/default.nix index b2ded4c7ac73f..b959ea3eda73d 100644 --- a/pkgs/games/dwarf-fortress/default.nix +++ b/pkgs/games/dwarf-fortress/default.nix @@ -29,6 +29,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 0000000000000..06a40bb85c9e9 --- /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; + }; +} diff --git a/pkgs/games/dwarf-fortress/wrapper/default.nix b/pkgs/games/dwarf-fortress/wrapper/default.nix index 99625abd99d29..9b171fc88b761 100644 --- a/pkgs/games/dwarf-fortress/wrapper/default.nix +++ b/pkgs/games/dwarf-fortress/wrapper/default.nix @@ -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; |