2021-01-22 06:56:40 +00:00
|
|
|
{ lib, stdenv, fetchurl, perl, zlib, buildPackages }:
|
2010-10-17 18:44:00 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "${passthru.pname}-${passthru.version}";
|
|
|
|
|
|
|
|
passthru = {
|
|
|
|
pname = "hspell";
|
2024-01-20 21:51:18 +00:00
|
|
|
version = "1.4";
|
2010-10-17 18:44:00 +00:00
|
|
|
};
|
|
|
|
|
2018-10-03 19:25:44 +00:00
|
|
|
PERL_USE_UNSAFE_INC = "1";
|
2018-07-12 07:16:48 +00:00
|
|
|
|
2010-10-17 18:44:00 +00:00
|
|
|
src = fetchurl {
|
|
|
|
url = "${meta.homepage}${name}.tar.gz";
|
2024-01-20 21:51:18 +00:00
|
|
|
hash = "sha256-cxD11YdA0h1tIVwReWWGAu99qXqBa8FJfIdkvpeqvqM=";
|
2010-10-17 18:44:00 +00:00
|
|
|
};
|
|
|
|
|
2024-01-20 21:51:18 +00:00
|
|
|
patches = [./remove-shared-library-checks.patch];
|
|
|
|
postPatch = "patchShebangs .";
|
2021-01-30 10:19:55 +00:00
|
|
|
preBuild = lib.optionalString (stdenv.hostPlatform != stdenv.buildPlatform) ''
|
2020-09-02 14:36:38 +00: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 14:36:38 +00:00
|
|
|
'';
|
|
|
|
nativeBuildInputs = [ perl zlib ];
|
|
|
|
# buildInputs = [ zlib ];
|
2010-10-17 18:44:00 +00:00
|
|
|
|
2021-01-21 17:00:13 +00:00
|
|
|
meta = with lib; {
|
2010-10-17 18:44:00 +00:00
|
|
|
description = "Hebrew spell checker";
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "http://hspell.ivrix.org.il/";
|
2018-10-12 21:24:30 +00:00
|
|
|
platforms = platforms.all;
|
|
|
|
license = licenses.gpl2;
|
2010-10-17 18:44:00 +00:00
|
|
|
};
|
|
|
|
}
|