From 3902499aaf400476f7512c3b66c2ba4ff3d19148 Mon Sep 17 00:00:00 2001 From: Tyson Whitehead Date: Thu, 7 Nov 2019 17:26:51 -0500 Subject: [PATCH] svtyper: Initial packaging --- pkgs/all-packages.nix | 2 ++ pkgs/svtyper.nix | 31 +++++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+) create mode 100644 pkgs/svtyper.nix diff --git a/pkgs/all-packages.nix b/pkgs/all-packages.nix index 1ed23f8..013d09f 100644 --- a/pkgs/all-packages.nix +++ b/pkgs/all-packages.nix @@ -56,6 +56,8 @@ self: super: pkgs: with pkgs; { samblaster = callPackage ./samblaster.nix { }; + svtyper = pythonPackages.callPackage ./svtyper.nix { }; + idba = callPackage ./idba.nix { }; nixStable = ( super.nixStable.override { confDir= "/nix/etc"; } ).overrideAttrs diff --git a/pkgs/svtyper.nix b/pkgs/svtyper.nix new file mode 100644 index 0000000..8401043 --- /dev/null +++ b/pkgs/svtyper.nix @@ -0,0 +1,31 @@ +{ lib, fetchPypi, buildPythonApplication +, scipy, cytoolz, pysam +, pytest, pytestrunner }: + +buildPythonApplication rec { + version = "0.7.1"; + pname = "svtyper"; + + src = fetchPypi { + inherit pname version; + sha256 = "1fryl5h947sf8rxj7pzrzjfy6is8xhq6yz25sd8hq88563mkianh"; + }; + + postPatch = '' + substituteInPlace setup.py \ + --replace o"pytest==4.6.4" "pytest" + ''; + + nativeBuildInputs = [ pytestrunner ]; + propagatedBuildInputs = [ scipy cytoolz pysam ]; + checkInputs = [ pytest ]; + + # test infrastructure, but no tests in the package + doCheck = false; + + meta = with lib; { + homepage = https://github.com/hall-lab/svtyper; + description = "Bayesian genotyper for structural variants."; + license = licenses.mit; + }; +}