From fe847fcc929b824596aa049b08f06c8af9519a68 Mon Sep 17 00:00:00 2001 From: Morgan Jones Date: Sun, 15 Jul 2018 06:41:27 +0000 Subject: [PATCH] Therapist needs to depend on the DF version, since it uses its MD5 --- pkgs/games/dwarf-fortress/default.nix | 36 +++++++++---------- pkgs/games/dwarf-fortress/lazy-pack.nix | 3 +- pkgs/games/dwarf-fortress/wrapper/default.nix | 3 +- 3 files changed, 22 insertions(+), 20 deletions(-) diff --git a/pkgs/games/dwarf-fortress/default.nix b/pkgs/games/dwarf-fortress/default.nix index 1ee33fb27f36..88a6d72bc485 100644 --- a/pkgs/games/dwarf-fortress/default.nix +++ b/pkgs/games/dwarf-fortress/default.nix @@ -64,10 +64,18 @@ let dfhack = callPackage ./dfhack { inherit (pkgs.perlPackages) XMLLibXML XMLLibXSLT; - inherit dfVersion; - inherit twbt; + inherit dfVersion twbt; stdenv = gccStdenv; }; + + dwarf-therapist = callPackage ./dwarf-therapist/wrapper.nix { + inherit dwarf-fortress; + dwarf-therapist = pkgs.qt5.callPackage ./dwarf-therapist { + texlive = pkgs.texlive.combine { + inherit (pkgs.texlive) scheme-basic float caption wrapfig adjmulticol sidecap preprint enumitem; + }; + }; + }; in callPackage ./wrapper { inherit (self) themes; @@ -76,41 +84,33 @@ let dwarf-fortress-unfuck = dwarf-fortress-unfuck; twbt = twbt; dfhack = dfhack; + dwarf-therapist = dwarf-therapist; }; }) (lib.attrNames self.df-hashes)); self = rec { df-hashes = builtins.fromJSON (builtins.readFile ./game.json); - + + # Aliases for the latest Dwarf Fortress and the selected Therapist install dwarf-fortress = getAttr (versionToName latestVersion) df-games; + dwarf-therapist = dwarf-fortress.dwarf-therapist; + dwarf-fortress-original = dwarf-fortress.dwarf-fortress; dwarf-fortress-full = callPackage ./lazy-pack.nix { - inherit versionToName; - inherit latestVersion; - inherit df-games; + inherit df-games versionToName latestVersion; }; - + soundSense = callPackage ./soundsense.nix { }; - dwarf-therapist = callPackage ./dwarf-therapist/wrapper.nix { - inherit (dwarf-fortress) dwarf-fortress; - dwarf-therapist = pkgs.qt5.callPackage ./dwarf-therapist { - texlive = pkgs.texlive.combine { - inherit (pkgs.texlive) scheme-basic float caption wrapfig adjmulticol sidecap preprint enumitem; - }; - }; - }; - legends-browser = callPackage ./legends-browser {}; themes = recurseIntoAttrs (callPackage ./themes { stdenv = stdenvNoCC; }); - # aliases + # Theme aliases phoebus-theme = themes.phoebus; cla-theme = themes.cla; - dwarf-fortress-original = dwarf-fortress.dwarf-fortress; }; in self // df-games diff --git a/pkgs/games/dwarf-fortress/lazy-pack.nix b/pkgs/games/dwarf-fortress/lazy-pack.nix index a05ea49ce814..3a81dcc9c931 100644 --- a/pkgs/games/dwarf-fortress/lazy-pack.nix +++ b/pkgs/games/dwarf-fortress/lazy-pack.nix @@ -8,7 +8,7 @@ , enableTWBT ? enableDFHack , enableSoundSense ? true , enableStoneSense ? true -, enableDwarfTherapist ? true, dwarf-therapist +, enableDwarfTherapist ? true , enableLegendsBrowser ? true, legends-browser , theme ? themes.phoebus # General config options: @@ -24,6 +24,7 @@ let dwarf-fortress = if hasAttr dfGame df-games then getAttr dfGame df-games else throw "Unknown Dwarf Fortress version: ${dfVersion}"; + dwarf-therapist = dwarf-fortress.dwarf-therapist; in buildEnv { name = "dwarf-fortress-full"; diff --git a/pkgs/games/dwarf-fortress/wrapper/default.nix b/pkgs/games/dwarf-fortress/wrapper/default.nix index 33523270b19d..8d9f06ffe143 100644 --- a/pkgs/games/dwarf-fortress/wrapper/default.nix +++ b/pkgs/games/dwarf-fortress/wrapper/default.nix @@ -1,5 +1,6 @@ { stdenv, lib, buildEnv, substituteAll , dwarf-fortress, dwarf-fortress-unfuck +, dwarf-therapist , enableDFHack ? false, dfhack , enableSoundSense ? false, soundSense, jdk , enableStoneSense ? false @@ -89,7 +90,7 @@ stdenv.mkDerivation rec { runDFHack = ./dfhack.in; runSoundSense = ./soundSense.in; - passthru = { inherit dwarf-fortress; }; + passthru = { inherit dwarf-fortress dwarf-therapist; }; buildCommand = '' mkdir -p $out/bin