nixpkgs/pkgs/development/libraries/hspell/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

45 lines
1.4 KiB
Nix
Raw Normal View History

2021-01-22 06:56:40 +00:00
{ lib, stdenv, fetchurl, perl, zlib, buildPackages }:
stdenv.mkDerivation rec {
name = "${passthru.pname}-${passthru.version}";
passthru = {
pname = "hspell";
2024-01-20 21:51:18 +00:00
version = "1.4";
};
2018-10-03 19:25:44 +00:00
PERL_USE_UNSAFE_INC = "1";
src = fetchurl {
url = "${meta.homepage}${name}.tar.gz";
2024-01-20 21:51:18 +00:00
hash = "sha256-cxD11YdA0h1tIVwReWWGAu99qXqBa8FJfIdkvpeqvqM=";
};
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) ''
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"
'';
postInstall = ''
patchShebangs --update $out/bin/multispell
'';
nativeBuildInputs = [ perl zlib ];
buildInputs = [ perl ];
strictDeps = true;
meta = with lib; {
description = "Hebrew spell checker";
homepage = "http://hspell.ivrix.org.il/";
2018-10-12 21:24:30 +00:00
platforms = platforms.all;
license = licenses.gpl2;
};
}