From ac3e621e7fc5501dd77dab6267de4a6a1a1b107e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Sun, 28 Jan 2024 12:17:37 -0800 Subject: [PATCH] deeptools: fix build --- .../science/biology/deeptools/default.nix | 36 ++++++++++++++----- pkgs/top-level/all-packages.nix | 2 +- 2 files changed, 29 insertions(+), 9 deletions(-) diff --git a/pkgs/applications/science/biology/deeptools/default.nix b/pkgs/applications/science/biology/deeptools/default.nix index a199e41d50aa..a7a1f77dfe90 100644 --- a/pkgs/applications/science/biology/deeptools/default.nix +++ b/pkgs/applications/science/biology/deeptools/default.nix @@ -1,19 +1,25 @@ -{ lib, python, fetchFromGitHub }: -with python.pkgs; -buildPythonApplication rec { - pname = "deepTools"; +{ lib +, python3 +, fetchFromGitHub +}: + +python3.pkgs.buildPythonApplication rec { + pname = "deeptools"; version = "3.5.4"; + pyproject = true; src = fetchFromGitHub { owner = "deeptools"; repo = "deepTools"; rev = version; - sha256 = "sha256-A8YdlMptmJyxWW0EYLjXFIWjIO/mttEC7VYdlCe9MaI="; + hash = "sha256-A8YdlMptmJyxWW0EYLjXFIWjIO/mttEC7VYdlCe9MaI="; }; - format = "pyproject"; + nativeBuildInputs = with python3.pkgs; [ + setuptools + ]; - propagatedBuildInputs = [ + propagatedBuildInputs = with python3.pkgs; [ numpy numpydoc scipy @@ -26,7 +32,21 @@ buildPythonApplication rec { importlib-metadata ]; - nativeCheckInputs = [ pytest ]; + nativeCheckInputs = with python3.pkgs; [ + pytestCheckHook + ]; + + preCheck = '' + export PATH="$out/bin:$PATH" + ''; + + disabledTestPaths = [ + # tests trip on `len(sys.argv) == 1` + "deeptools/test/test_bigwigAverage.py" + "deeptools/test/test_bigwigCompare_and_multiBigwigSummary.py" + "deeptools/test/test_heatmapper.py" + "deeptools/test/test_multiBamSummary.py" + ]; meta = with lib; { homepage = "https://deeptools.readthedocs.io/en/develop"; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index ef7ee1bd9ebd..ac428acd9c94 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -38886,7 +38886,7 @@ with pkgs; python3 = python311; }; - deeptools = callPackage ../applications/science/biology/deeptools { python = python3; }; + deeptools = callPackage ../applications/science/biology/deeptools { }; deep-translator = with python3Packages; toPythonApplication deep-translator;