15 stdenv.mkDerivation rec {
20 url = "https://ftp.ncbi.nlm.nih.gov/blast/executables/blast+/${version}/ncbi-blast-${version}+-src.tar.gz";
21 sha256 = "sha256-cSwtvfD7E8wcLU9O9d0c5LBsO1fpbf6o8j5umfWxZQ4=";
24 sourceRoot = "ncbi-blast-${version}+-src/c++";
27 # With flat Makefile we can use all_projects in order not to build extra.
28 # These extra cause clang to hang on Darwin.
29 "--with-flat-makefile"
30 "--without-makefile-auto-update"
31 "--with-dll" # build dynamic libraries (static are default)
34 makeFlags = [ "all_projects=app/" ];
37 export NCBICXX_RECONF_POLICY=warn
41 # The configure scripts wants to set AR="ar cr" unless it is already set in
42 # the environment. Because stdenv sets AR="ar", the result is a bad call to
43 # the assembler later in the process. Thus, we need to unset AR
46 for awks in scripts/common/impl/is_log_interesting.awk \
47 scripts/common/impl/report_duplicates.awk; do
49 substituteInPlace $awks \
50 --replace /usr/bin/awk ${gawk}/bin/awk
53 for mk in src/build-system/Makefile.meta.in \
54 src/build-system/helpers/run_with_lock.c ; do
56 substituteInPlace $mk \
57 --replace /bin/rm ${coreutils}/bin/rm
60 for mk in src/build-system/Makefile.meta.gmake=no \
61 src/build-system/Makefile.meta_l \
62 src/build-system/Makefile.meta_r \
63 src/build-system/Makefile.requirements \
64 src/build-system/Makefile.rules_with_autodep.in; do
66 substituteInPlace $mk \
67 --replace /bin/echo ${coreutils}/bin/echo
69 for mk in src/build-system/Makefile.meta_p \
70 src/build-system/Makefile.rules_with_autodep.in \
71 src/build-system/Makefile.protobuf.in ; do
73 substituteInPlace $mk \
74 --replace /bin/mv ${coreutils}/bin/mv
78 substituteInPlace src/build-system/configure \
79 --replace /bin/pwd ${coreutils}/bin/pwd \
80 --replace /bin/ln ${coreutils}/bin/ln
82 substituteInPlace src/build-system/configure.ac \
83 --replace /bin/pwd ${coreutils}/bin/pwd \
84 --replace /bin/ln ${coreutils}/bin/ln
86 substituteInPlace src/build-system/Makefile.meta_l \
87 --replace /bin/date ${coreutils}/bin/date
90 depsBuildBuild = [ buildPackages.stdenv.cc ];
91 nativeBuildInputs = [ perl ];
93 # perl is necessary in buildInputs so that installed perl scripts get patched
102 ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ ApplicationServices ];
103 hardeningDisable = [ "format" ];
106 substituteInPlace $out/bin/get_species_taxids.sh \
107 --replace /bin/rm ${coreutils}/bin/rm
109 patches = [ ./no_slash_bin.patch ];
111 enableParallelBuilding = true;
113 # Many tests require either network access or locally available databases
117 description = ''Basic Local Alignment Search Tool (BLAST) finds regions of similarity between biological sequences'';
118 homepage = "https://blast.ncbi.nlm.nih.gov/Blast.cgi";
119 license = licenses.publicDomain;
121 # Version 2.10.0 fails on Darwin
122 # See https://github.com/NixOS/nixpkgs/pull/61430
123 platforms = platforms.linux;
124 maintainers = with maintainers; [ luispedro ];