Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
44 lines
799 B
Nix
44 lines
799 B
Nix
{
|
|
lib,
|
|
pkgs,
|
|
stdenv,
|
|
buildPythonPackage,
|
|
foma,
|
|
icu,
|
|
swig,
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "hfst";
|
|
format = "setuptools";
|
|
inherit (pkgs.hfst) version src;
|
|
|
|
sourceRoot = "${src.name}/python";
|
|
|
|
postPatch = ''
|
|
# omorfi-python looks for 'hfst' Python package
|
|
sed -i 's/libhfst_swig/hfst/' setup.py;
|
|
'';
|
|
|
|
nativeBuildInputs = [ swig ];
|
|
|
|
buildInputs = [
|
|
icu
|
|
pkgs.hfst
|
|
];
|
|
|
|
setupPyBuildFlags = [ "--inplace" ];
|
|
|
|
# Find foma in Darwin tests
|
|
preCheck = lib.optionalString stdenv.hostPlatform.isDarwin ''
|
|
export DYLD_LIBRARY_PATH="${foma}/lib"
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "Python bindings for HFST";
|
|
homepage = "https://github.com/hfst/hfst";
|
|
license = licenses.gpl3;
|
|
maintainers = with maintainers; [ lurkki ];
|
|
};
|
|
}
|