2023-04-12 12:48:02 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchurl
|
|
|
|
, python3
|
|
|
|
, perl
|
|
|
|
, blast
|
|
|
|
, autoPatchelfHook
|
|
|
|
, zlib
|
|
|
|
, bzip2
|
|
|
|
, glib
|
|
|
|
, libxml2
|
|
|
|
, coreutils
|
|
|
|
}:
|
|
|
|
let
|
|
|
|
pname = "blast-bin";
|
2023-10-19 13:55:26 +00:00
|
|
|
version = "2.14.1";
|
2023-04-12 12:48:02 +00:00
|
|
|
|
|
|
|
srcs = rec {
|
|
|
|
x86_64-linux = fetchurl {
|
|
|
|
url = "https://ftp.ncbi.nlm.nih.gov/blast/executables/blast+/${version}/ncbi-blast-${version}+-x64-linux.tar.gz";
|
2023-10-19 13:55:26 +00:00
|
|
|
hash = "sha256-OO8MNOk6k0J9FlAGyCOhP+hirEIT6lL+rIInB8dQWEU=";
|
2023-04-12 12:48:02 +00:00
|
|
|
};
|
|
|
|
aarch64-linux = fetchurl {
|
2023-10-19 13:55:26 +00:00
|
|
|
url = "https://ftp.ncbi.nlm.nih.gov/blast/executables/blast+/${version}/ncbi-blast-${version}+-aarch64-linux.tar.gz";
|
|
|
|
hash = "sha256-JlOyoxZQBbvUcHIMv5muTuGQgrh2uom3rzDurhHQ+FM=";
|
2023-04-12 12:48:02 +00:00
|
|
|
};
|
|
|
|
x86_64-darwin = fetchurl {
|
|
|
|
url = "https://ftp.ncbi.nlm.nih.gov/blast/executables/blast+/${version}/ncbi-blast-${version}+-x64-macosx.tar.gz";
|
2023-10-19 13:55:26 +00:00
|
|
|
hash = "sha256-eMfuwMCD6VlDgeshLslDhYBBp0YOpL+6q/zSchR0bAs=";
|
2023-04-12 12:48:02 +00:00
|
|
|
};
|
|
|
|
aarch64-darwin = x86_64-darwin;
|
|
|
|
};
|
|
|
|
src = srcs.${stdenv.hostPlatform.system};
|
|
|
|
in
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
inherit pname version src;
|
|
|
|
|
2024-09-26 11:04:55 +00:00
|
|
|
nativeBuildInputs = lib.optionals stdenv.hostPlatform.isLinux [ autoPatchelfHook ];
|
2023-04-12 12:48:02 +00:00
|
|
|
|
2024-09-26 11:04:55 +00:00
|
|
|
buildInputs = [ python3 perl ] ++ lib.optionals stdenv.hostPlatform.isLinux [ zlib bzip2 glib libxml2 ];
|
2023-04-12 12:48:02 +00:00
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
|
|
|
|
install -Dm755 bin/* -t $out/bin
|
|
|
|
|
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
|
|
|
|
preFixup = ''
|
|
|
|
substituteInPlace $out/bin/get_species_taxids.sh \
|
|
|
|
--replace /bin/rm ${coreutils}/bin/rm
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
inherit (blast.meta) description homepage license;
|
|
|
|
platforms = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ];
|
2023-10-19 13:55:26 +00:00
|
|
|
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
|
2023-04-12 12:48:02 +00:00
|
|
|
maintainers = with maintainers; [ natsukium ];
|
|
|
|
};
|
|
|
|
}
|