mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-17 01:24:47 +00:00
Merge pull request #171469 from luispedro/static_bioinformatics
This commit is contained in:
commit
1bb17332ab
@ -17,6 +17,8 @@ stdenv.mkDerivation rec {
|
||||
sed -i '/^CC/d' Makefile
|
||||
'';
|
||||
|
||||
makeFlags = lib.optional stdenv.hostPlatform.isStatic "AR=${stdenv.cc.targetPrefix}ar";
|
||||
|
||||
# it's unclear which headers are intended to be part of the public interface
|
||||
# so we may find ourselves having to add more here over time
|
||||
installPhase = ''
|
||||
|
@ -14,6 +14,9 @@ stdenv.mkDerivation rec {
|
||||
nativeBuildInputs = [ cmake ];
|
||||
buildInputs = [ zlib ];
|
||||
|
||||
cmakeFlags = lib.optional stdenv.hostPlatform.isStatic [
|
||||
"-DSTATIC_BUILD=ON"
|
||||
];
|
||||
meta = with lib; {
|
||||
description = "An ultra-fast single-node solution for large and complex metagenomics assembly via succinct de Bruijn graph";
|
||||
license = licenses.gpl3;
|
||||
|
@ -22,8 +22,15 @@ stdenv.mkDerivation rec {
|
||||
|
||||
buildInputs = [ zlib ncurses htslib ];
|
||||
|
||||
preConfigure = lib.optional stdenv.hostPlatform.isStatic ''
|
||||
export LIBS="-lz -lbz2 -llzma"
|
||||
'';
|
||||
makeFlags = lib.optional stdenv.hostPlatform.isStatic "AR=${stdenv.cc.targetPrefix}ar";
|
||||
|
||||
configureFlags = [ "--with-htslib=${htslib}" ]
|
||||
++ lib.optional (ncurses == null) "--without-curses";
|
||||
++ lib.optional (ncurses == null) "--without-curses"
|
||||
++ lib.optional stdenv.hostPlatform.isStatic ["--without-curses" ]
|
||||
;
|
||||
|
||||
preCheck = ''
|
||||
patchShebangs test/
|
||||
|
@ -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/
|
||||
|
Loading…
Reference in New Issue
Block a user