Static builds for HTSLIB
We need to disable curses support and replace the build and install phases (otherwise, they expect that *.so files will be present).
This commit is contained in:
@@ -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/
|
||||
|
||||
Reference in New Issue
Block a user