2021-01-22 06:56:40 +00:00
|
|
|
{ lib, stdenv, fetchurl, perl, zlib, buildPackages }:
|
2010-10-17 19:44:00 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "${passthru.pname}-${passthru.version}";
|
|
|
|
|
|
|
|
passthru = {
|
|
|
|
pname = "hspell";
|
|
|
|
version = "1.1";
|
|
|
|
};
|
|
|
|
|
2018-10-03 20:25:44 +01:00
|
|
|
PERL_USE_UNSAFE_INC = "1";
|
2018-07-12 08:16:48 +01:00
|
|
|
|
2010-10-17 19:44:00 +01:00
|
|
|
src = fetchurl {
|
|
|
|
url = "${meta.homepage}${name}.tar.gz";
|
|
|
|
sha256 = "08x7rigq5pa1pfpl30qp353hbdkpadr1zc49slpczhsn0sg36pd6";
|
|
|
|
};
|
|
|
|
|
2021-01-24 09:19:10 +00:00
|
|
|
patchPhase = "patchShebangs .";
|
2021-01-30 10:19:55 +00:00
|
|
|
preBuild = lib.optionalString (stdenv.hostPlatform != stdenv.buildPlatform) ''
|
2020-09-02 15:36:38 +01:00
|
|
|
make CC=${buildPackages.stdenv.cc}/bin/cc find_sizes
|
|
|
|
mv find_sizes find_sizes_build
|
|
|
|
make clean
|
|
|
|
|
|
|
|
substituteInPlace Makefile --replace "./find_sizes" "./find_sizes_build"
|
2021-01-30 10:19:55 +00:00
|
|
|
substituteInPlace Makefile --replace "ar cr" "${lib.getBin stdenv.cc.bintools.bintools}/bin/${stdenv.cc.targetPrefix}ar cr"
|
|
|
|
substituteInPlace Makefile --replace "ranlib" "${lib.getBin stdenv.cc.bintools.bintools}/bin/${stdenv.cc.targetPrefix}ranlib"
|
|
|
|
substituteInPlace Makefile --replace "STRIP=strip" "STRIP=${lib.getBin stdenv.cc.bintools.bintools}/bin/${stdenv.cc.targetPrefix}strip"
|
2020-09-02 15:36:38 +01:00
|
|
|
'';
|
|
|
|
nativeBuildInputs = [ perl zlib ];
|
|
|
|
# buildInputs = [ zlib ];
|
2010-10-17 19:44:00 +01:00
|
|
|
|
2021-01-21 17:00:13 +00:00
|
|
|
meta = with lib; {
|
2010-10-17 19:44:00 +01:00
|
|
|
description = "Hebrew spell checker";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "http://hspell.ivrix.org.il/";
|
2018-10-12 22:24:30 +01:00
|
|
|
platforms = platforms.all;
|
|
|
|
license = licenses.gpl2;
|
2010-10-17 19:44:00 +01:00
|
|
|
};
|
|
|
|
}
|