biome: 1.9.2 -> 1.9.3
[NixPkgs.git] / pkgs / applications / science / biology / strelka / default.nix
blobad6c0d9e5a4cc730bdb30620e13dcad228e5f81c
1 {lib, stdenv, fetchFromGitHub, fetchpatch, cmake, boost, zlib, python2}:
3 stdenv.mkDerivation rec {
4   pname = "strelka";
5   version = "2.9.10";
7   src = fetchFromGitHub {
8     owner = "Illumina";
9     repo = "strelka";
10     rev = "v${version}";
11     sha256 = "1nykbmim1124xh22nrhrsn8xgjb3s2y7akrdapn9sl1gdych4ppf";
12   };
14   patches = [
15     # Pull pending fix for gcc-12:
16     #   https://github.com/Illumina/strelka/pull/204
17     (fetchpatch {
18       name = "limits.patch";
19       url = "https://github.com/Illumina/strelka/commit/98272cd345c6e4c672e6a5b7721204fcac0502d6.patch";
20       hash = "sha256-psBiuN32nvwZ+QX51JQjIdRhEE3k7PfwbkD10ckqvZk=";
21     })
22   ];
24   postPatch = ''
25     substituteInPlace src/cmake/boost.cmake \
26       --replace "1.58.0" "${boost.version}" \
27       --replace "Boost_USE_STATIC_LIBS ON" "Boost_USE_STATIC_LIBS OFF"
28   '';
30   nativeBuildInputs = [ cmake ];
31   buildInputs = [ boost zlib python2 ];
33   cmakeFlags = [
34     "-DCMAKE_CXX_STANDARD=14"
35   ];
37   env.NIX_CFLAGS_COMPILE = toString [
38     "-Wno-error=maybe-uninitialized"
39     "-Wno-error=pessimizing-move"
40   ];
42   preConfigure = ''
43     sed -i 's|/usr/bin/env python|${python2}/bin/python|' src/python/lib/makeRunScript.py
44     patchShebangs .
45   '';
47   postFixup = ''
48     pushd $out/lib/python/pyflow
49     sed -i 's|/bin/bash|${stdenv.shell}|' pyflowTaskWrapper.py
50     rm pyflowTaskWrapper.pyc
51     echo "import pyflowTaskWrapper" | python2
52     popd
53   '';
55   meta = with lib; {
56     description = "Germline and small variant caller";
57     license = licenses.gpl3;
58     homepage = "https://github.com/Illumina/strelka";
59     maintainers = with maintainers; [ jbedo ];
60     platforms = platforms.linux;
61   };