From 1ad8079f8bf368973659e4204f6a32b3b0fc8eee Mon Sep 17 00:00:00 2001 From: Daniel McCarney Date: Thu, 3 Nov 2022 20:34:11 -0400 Subject: [PATCH] ldmud: fix undefined reference to 'crypt' Adding `libxcrypt` as a dependency is required to avoid a link time error from an undefined reference to `crypt` in non-TLS-enabled builds now that glibc crypt support is optional[0]. Additionally, many of the `nativeBuildInputs` should be `buildInputs` since they are used at runtime and not build time. This is also fixed in this commit. [0]: ff30c899d8bd92d1a1c9f4d4e81455b04cb0868e --- pkgs/games/ldmud/default.nix | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pkgs/games/ldmud/default.nix b/pkgs/games/ldmud/default.nix index fa7b3c4e0b5..e676ce1a5cd 100644 --- a/pkgs/games/ldmud/default.nix +++ b/pkgs/games/ldmud/default.nix @@ -7,6 +7,7 @@ , libiconv , pcre , libgcrypt +, libxcrypt , json_c , libxml2 , ipv6Support ? false @@ -39,12 +40,13 @@ stdenv.mkDerivation rec { sourceRoot = "${src.name}/src"; nativeBuildInputs = - [ autoreconfHook pkg-config bison libgcrypt pcre json_c libxml2 ] + [ autoreconfHook pkg-config bison ]; + buildInputs = [ libgcrypt libxcrypt pcre json_c libxml2 ] ++ lib.optional mccpSupport zlib ++ lib.optional mysqlSupport libmysqlclient ++ lib.optional postgresSupport postgresql ++ lib.optional sqliteSupport sqlite ++ lib.optional tlsSupport openssl - ++ lib.optional pythonSupport python310; - buildInputs = lib.optionals stdenv.isDarwin [ libiconv ]; + ++ lib.optional pythonSupport python310 + ++ lib.optionals stdenv.isDarwin [ libiconv ]; # To support systems without autoconf LD puts its configure.ac in a non-default # location and uses a helper script. We skip that script and symlink the .ac