6 disablePosixThreads ? false,
9 stdenv.mkDerivation rec {
14 url = "mirror://sourceforge/mcrypt/Libmcrypt/${version}/libmcrypt-${version}.tar.gz";
15 sha256 = "0gipgb939vy9m66d3k8il98rvvwczyaw2ixr8yn6icds9c3nrsz4";
18 buildInputs = lib.optional stdenv.hostPlatform.isDarwin cctools;
21 lib.optionals disablePosixThreads [ "--disable-posix-threads" ]
22 ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
23 # AC_FUNC_MALLOC is broken on cross builds.
24 "ac_cv_func_malloc_0_nonnull=yes"
25 "ac_cv_func_realloc_0_nonnull=yes"
28 env.NIX_CFLAGS_COMPILE = toString [
29 "-Wno-implicit-function-declaration"
34 description = "Replacement for the old crypt() package and crypt(1) command, with extensions";
35 mainProgram = "libmcrypt-config";
36 homepage = "https://mcrypt.sourceforge.net";
38 platforms = lib.platforms.all;