Files
nixpkgs/pkgs/development/python-modules/luqum/default.nix
T
Robert Schütz 1a04744f74 treewide: remove superfluous disabled
There is no need to disable Python packages for Python versions that are
no longer in Nixpkgs.
This change was generated using the following script:

    pattern='^\s*disabled\s*=\s*pythonOlder\s*"3\.\([0-9]\|10\)"\s*;\s*$'
    for f in $(find -name '*.nix'); do
        grep -q "$pattern" "$f" || continue
        sed -i "/$pattern/d" "$f"
        if [ $(grep -c pythonOlder "$f") == 1 ]; then
            sed -i '/^\s*pythonOlder,\s*$/d' "$f"
        fi
        nixfmt "$f"
    done
2026-01-11 09:34:20 -08:00

57 lines
1.2 KiB
Nix

{
lib,
buildPythonPackage,
elastic-transport,
elasticsearch-dsl,
fetchFromGitHub,
ply,
pytestCheckHook,
pytest-cov-stub,
setuptools,
}:
buildPythonPackage rec {
pname = "luqum";
version = "1.0.0";
pyproject = true;
src = fetchFromGitHub {
owner = "jurismarches";
repo = "luqum";
tag = version;
hash = "sha256-X1P7sACcp2yVjW3xWmD88iDT4T9dSDi8yxwDFaRbEsc=";
};
postPatch = ''
substituteInPlace pyproject.toml \
--replace '--doctest-modules --doctest-glob="test_*.rst"' ""
'';
nativeBuildInputs = [ setuptools ];
propagatedBuildInputs = [ ply ];
nativeCheckInputs = [
elastic-transport
elasticsearch-dsl
pytestCheckHook
pytest-cov-stub
];
pythonImportsCheck = [ "luqum" ];
disabledTestPaths = [
# Tests require an Elasticsearch instance
"tests/test_elasticsearch/test_es_integration.py"
"tests/test_elasticsearch/test_es_naming.py"
];
meta = {
description = "Lucene query parser generating ElasticSearch queries";
homepage = "https://github.com/jurismarches/luqum";
changelog = "https://github.com/jurismarches/luqum/releases/tag/${src.tag}";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ happysalada ];
};
}