diff --git a/pkgs/development/python-modules/pyfaidx/default.nix b/pkgs/development/python-modules/pyfaidx/default.nix index b3cb0f886bd71..eca3180a61768 100644 --- a/pkgs/development/python-modules/pyfaidx/default.nix +++ b/pkgs/development/python-modules/pyfaidx/default.nix @@ -1,26 +1,28 @@ { lib, buildPythonPackage, - fetchPypi, + fetchFromGitHub, glibcLocales, importlib-metadata, - numpy, + packaging, + htslib, + fsspec, pytestCheckHook, - pythonOlder, + biopython, setuptools, setuptools-scm, }: buildPythonPackage rec { pname = "pyfaidx"; - version = "0.8.1.2"; + version = "0.8.1.3"; pyproject = true; - disabled = pythonOlder "3.7"; - - src = fetchPypi { - inherit pname version; - hash = "sha256-2EUkcEVbHnePk5aUR9uOok3rRiTHxAdpUWRZy2+HvDM="; + src = fetchFromGitHub { + owner = "mdshw5"; + repo = "pyfaidx"; + rev = "refs/tags/v${version}"; + hash = "sha256-PKcopIu/0ko4Jl2+G0ZivZXvMwACeIFFFlPt5dlDDfQ="; }; build-system = [ @@ -28,27 +30,31 @@ buildPythonPackage rec { setuptools-scm ]; - dependencies = [ importlib-metadata ]; + dependencies = [ + importlib-metadata + packaging + ]; nativeCheckInputs = [ - glibcLocales - numpy pytestCheckHook - ]; - - disabledTestPaths = [ - # FileNotFoundError: [Errno 2] No such file or directory: 'data/genes.fasta.gz' - "tests/test_Fasta_bgzip.py" + biopython + htslib + fsspec + glibcLocales ]; pythonImportsCheck = [ "pyfaidx" ]; - meta = with lib; { + preCheck = '' + bgzip --keep tests/data/genes.fasta + ''; + + meta = { description = "Python classes for indexing, retrieval, and in-place modification of FASTA files using a samtools compatible index"; homepage = "https://github.com/mdshw5/pyfaidx"; changelog = "https://github.com/mdshw5/pyfaidx/releases/tag/v${version}"; - license = licenses.bsd3; - maintainers = with maintainers; [ jbedo ]; + license = lib.licenses.bsd3; + maintainers = with lib.maintainers; [ jbedo ]; mainProgram = "faidx"; }; }