11 stdenv.mkDerivation rec {
16 url = "https://github.com/samtools/samtools/releases/download/${version}/${pname}-${version}.tar.bz2";
17 hash = "sha256-cfYEmWaOTAjn10X7/yTBXMigl3q6sazV0rtBm9sGXpY=";
20 # tests require `bgzip` from the htslib package
21 nativeCheckInputs = [ htslib ];
23 nativeBuildInputs = [ perl ];
31 preConfigure = lib.optional stdenv.hostPlatform.isStatic ''
32 export LIBS="-lz -lbz2 -llzma"
34 makeFlags = lib.optional stdenv.hostPlatform.isStatic "AR=${stdenv.cc.targetPrefix}ar";
37 [ "--with-htslib=${htslib}" ]
38 ++ lib.optional (ncurses == null) "--without-curses"
39 ++ lib.optionals stdenv.hostPlatform.isStatic [ "--without-curses" ];
45 enableParallelBuilding = true;
50 description = "Tools for manipulating SAM/BAM/CRAM format";
51 license = licenses.mit;
52 homepage = "http://www.htslib.org/";
53 platforms = platforms.unix;
54 maintainers = with maintainers; [