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; + }; +}