nixpkgs/pkgs/development/python-modules/aspell-python/default.nix
Guillaume Girol 33afbf39f6 treewide: switch to nativeCheckInputs
checkInputs used to be added to nativeBuildInputs. Now we have
nativeCheckInputs to do that instead. Doing this treewide change allows
to keep hashes identical to before the introduction of
nativeCheckInputs.
2023-01-21 12:00:00 +00:00

59 lines
1.1 KiB
Nix

{ lib
, aspell
, aspellDicts
, buildPythonPackage
, fetchPypi
, isPy27
, pytestCheckHook
, pythonAtLeast
}:
buildPythonPackage rec {
pname = "aspell-python";
version = "1.15";
format = "setuptools";
disabled = isPy27;
src = fetchPypi {
pname = "aspell-python-py3";
inherit version;
extension = "tar.bz2";
hash = "sha256-IEKRDmQY5fOH9bQk0dkUAy7UzpBOoZW4cNtVvLMcs40=";
};
buildInputs = [
aspell
];
nativeCheckInputs = [
pytestCheckHook
];
preCheck = ''
export ASPELL_CONF="dict-dir ${aspellDicts.en}/lib/aspell"
export HOME=$(mktemp -d)
'';
pytestFlagsArray = [
"test/unittests.py"
];
disabledTests = lib.optionals (pythonAtLeast "3.10") [
# https://github.com/WojciechMula/aspell-python/issues/22
"test_add"
"test_get"
"test_saveall"
];
pythonImportsCheck = [
"aspell"
];
meta = with lib; {
description = "Python wrapper for aspell (C extension and Python version)";
homepage = "https://github.com/WojciechMula/aspell-python";
license = licenses.bsd3;
maintainers = with maintainers; [ SuperSandro2000 ];
};
}