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]: ff30c899d8
This commit is contained in:
Daniel McCarney 2022-11-03 20:34:11 -04:00
parent 39cc274424
commit 1ad8079f8b

View file

@ -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