From c9728a4dcfdcb48be27709cfd64b702525b5bab1 Mon Sep 17 00:00:00 2001 From: Linus Heckemann Date: Thu, 20 Sep 2018 18:47:13 +0100 Subject: [PATCH] nethack: document cross-compilation fix --- pkgs/games/nethack/default.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkgs/games/nethack/default.nix b/pkgs/games/nethack/default.nix index 56342728b40f..6f60f8d0c1cb 100644 --- a/pkgs/games/nethack/default.nix +++ b/pkgs/games/nethack/default.nix @@ -73,7 +73,11 @@ in stdenv.mkDerivation rec { -DCOMPRESS_EXTENSION=\\".gz\\",' \ -i sys/unix/hints/linux-qt4 ''} - ${lib.optionalString (stdenv.buildPlatform != stdenv.hostPlatform) '' + ${lib.optionalString (stdenv.buildPlatform != stdenv.hostPlatform) + # If we're cross-compiling, replace the paths to the data generation tools + # with the ones from the build platform's nethack package, since we can't + # run the ones we've built here. + '' ${buildPackages.perl}/bin/perl -p \ -e 's,[a-z./]+/(makedefs|dgn_comp|lev_comp|dlb)(?!\.),${buildPackages.nethack}/libexec/nethack/\1,g' \ -i sys/unix/Makefile.*