Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 stdenv, 4 fetchurl, 5 perl, 6 zlib, 7 buildPackages, 8}: 9 10stdenv.mkDerivation rec { 11 name = "${passthru.pname}-${passthru.version}"; 12 13 passthru = { 14 pname = "hspell"; 15 version = "1.4"; 16 }; 17 18 PERL_USE_UNSAFE_INC = "1"; 19 20 src = fetchurl { 21 url = "${meta.homepage}${name}.tar.gz"; 22 hash = "sha256-cxD11YdA0h1tIVwReWWGAu99qXqBa8FJfIdkvpeqvqM="; 23 }; 24 25 patches = [ ./remove-shared-library-checks.patch ]; 26 postPatch = "patchShebangs ."; 27 preBuild = lib.optionalString (stdenv.hostPlatform != stdenv.buildPlatform) '' 28 make CC='${buildPackages.stdenv.cc}/bin/cc -I${lib.getDev buildPackages.zlib}/include -L${buildPackages.zlib}/lib' find_sizes 29 mv find_sizes find_sizes_build 30 make clean 31 32 substituteInPlace Makefile --replace "./find_sizes" "./find_sizes_build" 33 substituteInPlace Makefile --replace "ar cr" "${lib.getBin stdenv.cc.bintools.bintools}/bin/${stdenv.cc.targetPrefix}ar cr" 34 substituteInPlace Makefile --replace "ranlib" "${lib.getBin stdenv.cc.bintools.bintools}/bin/${stdenv.cc.targetPrefix}ranlib" 35 substituteInPlace Makefile --replace "STRIP=strip" "STRIP=${lib.getBin stdenv.cc.bintools.bintools}/bin/${stdenv.cc.targetPrefix}strip" 36 ''; 37 postInstall = '' 38 patchShebangs --update $out/bin/multispell 39 ''; 40 nativeBuildInputs = [ 41 perl 42 zlib 43 ]; 44 buildInputs = [ 45 perl 46 zlib 47 ]; 48 49 strictDeps = true; 50 51 meta = with lib; { 52 description = "Hebrew spell checker"; 53 homepage = "http://hspell.ivrix.org.il/"; 54 platforms = platforms.all; 55 license = licenses.gpl2; 56 }; 57}