mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-27 16:15:05 +00:00
a9ce6eb94b
the build perl (and zlib) are still needed during the build phase, but now the host perl is correctly used at runtime.
45 lines
1.4 KiB
Nix
45 lines
1.4 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 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 ];
|
|
|
|
strictDeps = true;
|
|
|
|
meta = with lib; {
|
|
description = "Hebrew spell checker";
|
|
homepage = "http://hspell.ivrix.org.il/";
|
|
platforms = platforms.all;
|
|
license = licenses.gpl2;
|
|
};
|
|
}
|