2021-02-05 17:12:51 +00:00
|
|
|
{ lib, stdenv, fetchurl, darwin, disablePosixThreads ? false }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-07-21 07:28:18 +00:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "libmcrypt";
|
|
|
|
version = "2.5.8";
|
2021-02-05 17:12:51 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
src = fetchurl {
|
2021-07-21 07:28:18 +00:00
|
|
|
url = "mirror://sourceforge/mcrypt/Libmcrypt/${version}/libmcrypt-${version}.tar.gz";
|
2020-04-24 23:36:52 +00:00
|
|
|
sha256 = "0gipgb939vy9m66d3k8il98rvvwczyaw2ixr8yn6icds9c3nrsz4";
|
|
|
|
};
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
buildInputs = lib.optional stdenv.isDarwin darwin.cctools;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
configureFlags = lib.optionals disablePosixThreads [ "--disable-posix-threads" ]
|
|
|
|
++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
|
|
|
|
# AC_FUNC_MALLOC is broken on cross builds.
|
|
|
|
"ac_cv_func_malloc_0_nonnull=yes"
|
|
|
|
"ac_cv_func_realloc_0_nonnull=yes"
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
env = lib.optionalAttrs stdenv.cc.isClang {
|
|
|
|
NIX_CFLAGS_COMPILE = "-Wno-implicit-function-declaration -Wno-implicit-int";
|
|
|
|
};
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
meta = {
|
|
|
|
description = "Replacement for the old crypt() package and crypt(1) command, with extensions";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "libmcrypt-config";
|
2023-02-22 10:55:15 +00:00
|
|
|
homepage = "https://mcrypt.sourceforge.net";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = "GPL";
|
2023-02-02 18:25:31 +00:00
|
|
|
platforms = lib.platforms.all;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|