mirror of
https://github.com/CHN-beta/nixpkgs.git
synced 2026-01-12 02:40:31 +08:00
As mentioned by the configure script output, hspell will fall back
on using `gzip` program when not linked against `zlib`:
No Zlib library, defaulting to using pipes
It has been removed in 67f0a216e5 for some reason.
Without this patch, Geary is stuck loading messages, even though I can interact
with the rest of its UI. I am also getting the following in the log so broken
piping might be breaking webkitgtk for some reason:
Hspell: can't run gzip -dc '/nix/store/14qk9r9ywvpqn0a24fvw1iwjv302d04j-hspell-1.4/share/hspell/hebrew.wgz.prefixes'.
Could not create GBM EGL display: EGL_NOT_INITIALIZED. Aborting...
And after quitting Geary:
*[wrn] 18:29:13.0226 geary:application-client.vala:464: Forcing shutdown of Geary, 7s passed...
gzip:
gzip: stdout: Broken pipe
stdout: Broken pipe
Co-authored-by: Colin <colin@uninsane.org>
58 lines
1.5 KiB
Nix
58 lines
1.5 KiB
Nix
{
|
|
lib,
|
|
stdenv,
|
|
fetchurl,
|
|
perl,
|
|
zlib,
|
|
buildPackages,
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
name = "${passthru.pname}-${passthru.version}";
|
|
|
|
passthru = {
|
|
pname = "hspell";
|
|
version = "1.4";
|
|
};
|
|
|
|
PERL_USE_UNSAFE_INC = "1";
|
|
|
|
src = fetchurl {
|
|
url = "${meta.homepage}${name}.tar.gz";
|
|
hash = "sha256-cxD11YdA0h1tIVwReWWGAu99qXqBa8FJfIdkvpeqvqM=";
|
|
};
|
|
|
|
patches = [ ./remove-shared-library-checks.patch ];
|
|
postPatch = "patchShebangs .";
|
|
preBuild = lib.optionalString (stdenv.hostPlatform != stdenv.buildPlatform) ''
|
|
make CC='${buildPackages.stdenv.cc}/bin/cc -I${lib.getDev buildPackages.zlib}/include -L${buildPackages.zlib}/lib' find_sizes
|
|
mv find_sizes find_sizes_build
|
|
make clean
|
|
|
|
substituteInPlace Makefile --replace "./find_sizes" "./find_sizes_build"
|
|
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
|
|
zlib
|
|
];
|
|
|
|
strictDeps = true;
|
|
|
|
meta = with lib; {
|
|
description = "Hebrew spell checker";
|
|
homepage = "http://hspell.ivrix.org.il/";
|
|
platforms = platforms.all;
|
|
license = licenses.gpl2;
|
|
};
|
|
}
|