|
|
|
@ -14,9 +14,25 @@ stdenv.mkDerivation rec { |
|
|
|
|
|
|
|
|
|
buildInputs = [ zlib bzip2 xz curl ]; |
|
|
|
|
|
|
|
|
|
configureFlags = [ "--enable-libcurl" ]; # optional but strongly recommended |
|
|
|
|
configureFlags = if ! stdenv.hostPlatform.isStatic |
|
|
|
|
then [ "--enable-libcurl" ] # optional but strongly recommended |
|
|
|
|
else [ "--disable-libcurl" "--disable-plugins" ]; |
|
|
|
|
|
|
|
|
|
installFlags = [ "prefix=$(out)" ]; |
|
|
|
|
|
|
|
|
|
# In the case of static builds, we need to replace the build and install phases |
|
|
|
|
buildPhase = lib.optional stdenv.hostPlatform.isStatic '' |
|
|
|
|
make AR=$AR lib-static |
|
|
|
|
make LDFLAGS=-static bgzip htsfile tabix |
|
|
|
|
''; |
|
|
|
|
|
|
|
|
|
installPhase = lib.optional stdenv.hostPlatform.isStatic '' |
|
|
|
|
install -d $out/bin |
|
|
|
|
install -d $out/lib |
|
|
|
|
install -d $out/include/htslib |
|
|
|
|
install -D libhts.a $out/lib |
|
|
|
|
install -m644 htslib/*h $out/include/htslib |
|
|
|
|
install -D bgzip htsfile tabix $out/bin |
|
|
|
|
''; |
|
|
|
|
|
|
|
|
|
preCheck = '' |
|
|
|
|
patchShebangs test/ |
|
|
|
|