Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at 23.11-beta 27 lines 895 B view raw
1{ lib, stdenv, fetchurl, darwin, disablePosixThreads ? false }: 2 3stdenv.mkDerivation rec { 4 pname = "libmcrypt"; 5 version = "2.5.8"; 6 7 src = fetchurl { 8 url = "mirror://sourceforge/mcrypt/Libmcrypt/${version}/libmcrypt-${version}.tar.gz"; 9 sha256 = "0gipgb939vy9m66d3k8il98rvvwczyaw2ixr8yn6icds9c3nrsz4"; 10 }; 11 12 buildInputs = lib.optional stdenv.isDarwin darwin.cctools; 13 14 configureFlags = lib.optionals disablePosixThreads [ "--disable-posix-threads" ] 15 ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ 16 # AC_FUNC_MALLOC is broken on cross builds. 17 "ac_cv_func_malloc_0_nonnull=yes" 18 "ac_cv_func_realloc_0_nonnull=yes" 19 ]; 20 21 meta = { 22 description = "Replacement for the old crypt() package and crypt(1) command, with extensions"; 23 homepage = "https://mcrypt.sourceforge.net"; 24 license = "GPL"; 25 platforms = lib.platforms.all; 26 }; 27}