Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at fix-function-merge 39 lines 1.4 kB view raw
1{ lib, stdenv, fetchurl, perl, zlib, buildPackages }: 2 3stdenv.mkDerivation rec { 4 name = "${passthru.pname}-${passthru.version}"; 5 6 passthru = { 7 pname = "hspell"; 8 version = "1.4"; 9 }; 10 11 PERL_USE_UNSAFE_INC = "1"; 12 13 src = fetchurl { 14 url = "${meta.homepage}${name}.tar.gz"; 15 hash = "sha256-cxD11YdA0h1tIVwReWWGAu99qXqBa8FJfIdkvpeqvqM="; 16 }; 17 18 patches = [./remove-shared-library-checks.patch]; 19 postPatch = "patchShebangs ."; 20 preBuild = lib.optionalString (stdenv.hostPlatform != stdenv.buildPlatform) '' 21 make CC=${buildPackages.stdenv.cc}/bin/cc find_sizes 22 mv find_sizes find_sizes_build 23 make clean 24 25 substituteInPlace Makefile --replace "./find_sizes" "./find_sizes_build" 26 substituteInPlace Makefile --replace "ar cr" "${lib.getBin stdenv.cc.bintools.bintools}/bin/${stdenv.cc.targetPrefix}ar cr" 27 substituteInPlace Makefile --replace "ranlib" "${lib.getBin stdenv.cc.bintools.bintools}/bin/${stdenv.cc.targetPrefix}ranlib" 28 substituteInPlace Makefile --replace "STRIP=strip" "STRIP=${lib.getBin stdenv.cc.bintools.bintools}/bin/${stdenv.cc.targetPrefix}strip" 29 ''; 30 nativeBuildInputs = [ perl zlib ]; 31# buildInputs = [ zlib ]; 32 33 meta = with lib; { 34 description = "Hebrew spell checker"; 35 homepage = "http://hspell.ivrix.org.il/"; 36 platforms = platforms.all; 37 license = licenses.gpl2; 38 }; 39}