about summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorRobert Scott <code@humanleg.org.uk>2023-10-06 22:02:55 +0100
committerGitHub <noreply@github.com>2023-10-06 22:02:55 +0100
commit57bd0c287652e0be1c9255bfcc1cd13148aa0b54 (patch)
treee16387478be14dffc5f19e8540e2a46d1aff1836 /pkgs
parent45b469ec29e1df29cf3053576901cbeb2803c591 (diff)
parent96178c29a4149d07adf4d7d4e2f6c7d2d7f2de0d (diff)
Merge pull request #259413 from natsukium/truvari/update
truvari: 4.0.0 -> 4.1.0; python311Packages.pywfa: init at 0.5.1
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/applications/science/biology/truvari/default.nix27
-rw-r--r--pkgs/development/python-modules/pywfa/default.nix53
-rw-r--r--pkgs/top-level/python-packages.nix2
3 files changed, 64 insertions, 18 deletions
diff --git a/pkgs/applications/science/biology/truvari/default.nix b/pkgs/applications/science/biology/truvari/default.nix
index e626af56278fa..946f4be606326 100644
--- a/pkgs/applications/science/biology/truvari/default.nix
+++ b/pkgs/applications/science/biology/truvari/default.nix
@@ -1,6 +1,5 @@
 { lib
 , fetchFromGitHub
-, fetchpatch
 , python3Packages
 , runtimeShell
 , bcftools
@@ -16,37 +15,28 @@ let
   };
 in python3Packages.buildPythonApplication rec {
   pname = "truvari";
-  version = "4.0.0";
+  version = "4.1.0";
+  pyproject = true;
 
   src = fetchFromGitHub {
     owner = "ACEnglish";
     repo = "truvari";
     rev = "v${version}";
-    hash = "sha256-UJNMKEV5m2jFqnWvkVAtymkcE2TjPIXp7JqRZpMSqsE=";
+    hash = "sha256-HFVAv1TTL/nMjr62tQKhMdwh25P/y4nBGzSbxoJxMmo=";
   };
 
-  patches = [
-    (fetchpatch {
-      name = "fix-anno-trf-on-darwin.patch";
-      url = "https://github.com/ACEnglish/truvari/commit/f9f36305e8eaa88f951562210e3672a4d4f71265.patch";
-      hash = "sha256-7O9jTQDCC2b8hUBm0qJQCYMzTC9NFtn/E0dTHSfJALU=";
-    })
-    (fetchpatch {
-      name = "fix-anno-grm-on-darwin.patch";
-      url = "https://github.com/ACEnglish/truvari/commit/31416552008a506204ed4e2add55474f10392357.patch";
-      hash = "sha256-42u0ewZU38GCoSfff+XQFv9hEFeO3WlJufTHcl6vkN4=";
-    })
-  ];
-
   postPatch = ''
-    substituteInPlace setup.py \
-      --replace "rich==" "rich>="
     substituteInPlace truvari/utils.py \
       --replace "/bin/bash" "${runtimeShell}"
     patchShebangs repo_utils/test_files
   '';
 
+  nativeBuildInputs = [
+    python3Packages.setuptools
+  ];
+
   propagatedBuildInputs = with python3Packages; [
+    pywfa
     rich
     edlib
     pysam
@@ -83,6 +73,7 @@ in python3Packages.buildPythonApplication rec {
   meta = with lib; {
     description = "Structural variant comparison tool for VCFs";
     homepage = "https://github.com/ACEnglish/truvari";
+    changelog = "https://github.com/ACEnglish/truvari/releases/tag/${src.rev}";
     license = licenses.mit;
     maintainers = with maintainers; [ natsukium scalavision ];
     longDescription = ''
diff --git a/pkgs/development/python-modules/pywfa/default.nix b/pkgs/development/python-modules/pywfa/default.nix
new file mode 100644
index 0000000000000..529417db98969
--- /dev/null
+++ b/pkgs/development/python-modules/pywfa/default.nix
@@ -0,0 +1,53 @@
+{ lib
+, buildPythonPackage
+, fetchFromGitHub
+, pythonOlder
+, cython
+, setuptools
+, wheel
+, pysam
+, unittestCheckHook
+}:
+
+buildPythonPackage rec {
+  pname = "pywfa";
+  version = "0.5.1";
+  pyproject = true;
+
+  disabled = pythonOlder "3.7";
+
+  src = fetchFromGitHub {
+    owner = "kcleal";
+    repo = "pywfa";
+    rev = "refs/tags/v${version}";
+    hash = "sha256-oeVXK9uyH4E98tApKrA7dXifQYb41KuDTAZ40XgAaF8=";
+  };
+
+  nativeBuildInputs = [
+    cython
+    setuptools
+    wheel
+  ];
+
+  nativeCheckInputs = [
+    pysam
+    unittestCheckHook
+  ];
+
+  preCheck = ''
+    cd pywfa/tests
+  '';
+
+  pythonImportsCheck = [
+    "pywfa"
+    "pywfa.align"
+  ];
+
+  meta = with lib; {
+    description = "Python wrapper for wavefront alignment using WFA2-lib";
+    homepage = "https://github.com/kcleal/pywfa";
+    changelog = "https://github.com/kcleal/pywfa/releases/tag/${src.rev}";
+    license = licenses.mit;
+    maintainers = with maintainers; [ natsukium ];
+  };
+}
diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix
index 2eeed1626a1c8..40955510ff47c 100644
--- a/pkgs/top-level/python-packages.nix
+++ b/pkgs/top-level/python-packages.nix
@@ -11707,6 +11707,8 @@ self: super: with self; {
 
   pywerview = callPackage ../development/python-modules/pywerview { };
 
+  pywfa = callPackage ../development/python-modules/pywfa { };
+
   pywilight = callPackage ../development/python-modules/pywilight { };
 
   pywinrm = callPackage ../development/python-modules/pywinrm { };