summary refs log tree commit diff
path: root/pkgs/games
diff options
context:
space:
mode:
authorCole Helbling <cole.e.helbling@outlook.com>2020-08-21 13:57:25 -0700
committerJon <jonringer@users.noreply.github.com>2020-08-21 14:45:53 -0700
commit50bf68669a9a362422660288c4357a1d4af60119 (patch)
tree59f211d765b2d2f00b5d3b6c555c1388bd782034 /pkgs/games
parent5db4a6538498b55ad1fc9c13ba33fee242c1453d (diff)
downloadnixpkgs-50bf68669a9a362422660288c4357a1d4af60119.tar
nixpkgs-50bf68669a9a362422660288c4357a1d4af60119.tar.gz
nixpkgs-50bf68669a9a362422660288c4357a1d4af60119.tar.bz2
nixpkgs-50bf68669a9a362422660288c4357a1d4af60119.tar.lz
nixpkgs-50bf68669a9a362422660288c4357a1d4af60119.tar.xz
nixpkgs-50bf68669a9a362422660288c4357a1d4af60119.tar.zst
nixpkgs-50bf68669a9a362422660288c4357a1d4af60119.zip
dfhack: fix ruby plugin
dfhack expects an unversioned libruby.so to be present in the hack
subdirectory for ruby plugins to function. The glob is necessary,
because the ruby package's library names are formatted as
ruby-${version}.so for whatever reason. The glob makes it possible for
ruby to update without manual intervention being needed here.
Diffstat (limited to 'pkgs/games')
-rw-r--r--pkgs/games/dwarf-fortress/dfhack/default.nix8
1 files changed, 7 insertions, 1 deletions
diff --git a/pkgs/games/dwarf-fortress/dfhack/default.nix b/pkgs/games/dwarf-fortress/dfhack/default.nix
index 03ce8a285ab..11c21b82c29 100644
--- a/pkgs/games/dwarf-fortress/dfhack/default.nix
+++ b/pkgs/games/dwarf-fortress/dfhack/default.nix
@@ -1,5 +1,5 @@
 { stdenv, buildEnv, lib, fetchFromGitHub, cmake, writeScriptBin
-, perl, XMLLibXML, XMLLibXSLT, zlib
+, perl, XMLLibXML, XMLLibXSLT, zlib, ruby
 , enableStoneSense ? false,  allegro5, libGLU, libGL
 , enableTWBT ? true, twbt
 , SDL
@@ -140,6 +140,12 @@ let
     cmakeFlags = [ "-DDFHACK_BUILD_ARCH=${arch}" "-DDOWNLOAD_RUBY=OFF" ]
               ++ lib.optionals enableStoneSense [ "-DBUILD_STONESENSE=ON" "-DSTONESENSE_INTERNAL_SO=OFF" ];
 
+    # dfhack expects an unversioned libruby.so to be present in the hack
+    # subdirectory for ruby plugins to function.
+    postInstall = ''
+      ln -s ${ruby}/lib/libruby-*.so $out/hack/libruby.so
+    '';
+
     enableParallelBuilding = true;
   };
 in