1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-25 03:17:13 +00:00

mmseqs2: 15-6f452 -> 16-747c6 (#362040)

This commit is contained in:
Weijia Wang 2024-12-08 22:24:55 +01:00 committed by GitHub
commit cd6abe59e0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 96 additions and 55 deletions

View file

@ -1,51 +0,0 @@
{ lib
, stdenv
, fetchFromGitHub
, cmake
, xxd
, perl
, installShellFiles
, enableAvx2 ? stdenv.hostPlatform.avx2Support
, enableSse4_1 ? stdenv.hostPlatform.sse4_1Support
, enableMpi ? false
, mpi
, openmp
, zlib
, bzip2
}:
stdenv.mkDerivation rec {
pname = "mmseqs2";
version = "15-6f452";
src = fetchFromGitHub {
owner = "soedinglab";
repo = pname;
rev = version;
sha256 = "sha256-L+zOWrGkCLz/wqpBuji8H4/93sDFpcfnDOE8FHq1j84=";
};
nativeBuildInputs = [ cmake xxd perl installShellFiles ];
cmakeFlags =
lib.optional enableAvx2 "-DHAVE_AVX2=1"
++ lib.optional enableSse4_1 "-DHAVE_SSE4_1=1"
++ lib.optional enableMpi "-DHAVE_MPI=1";
buildInputs =
lib.optionals stdenv.cc.isClang [ openmp zlib bzip2 ]
++ lib.optional enableMpi mpi;
postInstall = ''
installShellCompletion --bash --cmd mmseqs $out/util/bash-completion.sh
rm -r $out/util/
'';
meta = with lib; {
description = "Ultra fast and sensitive sequence search and clustering suite";
mainProgram = "mmseqs";
homepage = "https://mmseqs.com/";
license = licenses.gpl3;
maintainers = with maintainers; [ natsukium ];
platforms = platforms.unix;
};
}

View file

@ -0,0 +1,96 @@
{
lib,
config,
stdenv,
fetchFromGitHub,
cmake,
xxd,
perl,
installShellFiles,
enableAvx2 ? stdenv.hostPlatform.avx2Support,
enableSse4_1 ? stdenv.hostPlatform.sse4_1Support,
enableMpi ? false,
mpi,
cudaSupport ? config.cudaSupport,
cudaPackages,
llvmPackages,
zlib,
bzip2,
pkgsStatic,
runCommand,
}:
let
# require static library, libzstd.a
inherit (pkgsStatic) zstd;
in
stdenv.mkDerivation (finalAttrs: {
pname = "mmseqs2";
version = "16-747c6";
src = fetchFromGitHub {
owner = "soedinglab";
repo = "mmseqs2";
rev = "refs/tags/${finalAttrs.version}";
hash = "sha256-O7tx+gdVAmZLihPnWSo9RWNVzfPjI61LGY/XeaGHrI0=";
};
nativeBuildInputs =
[
cmake
xxd
perl
installShellFiles
zstd
]
++ lib.optionals cudaSupport [
cudaPackages.cuda_nvcc
];
cmakeFlags =
[
(lib.cmakeBool "HAVE_AVX2" enableAvx2)
(lib.cmakeBool "HAVE_SSE4_1" enableSse4_1)
(lib.cmakeBool "HAVE_MPI" enableMpi)
(lib.cmakeBool "USE_SYSTEM_ZSTD" true)
(lib.cmakeBool "HAVE_ARM8" stdenv.hostPlatform.isAarch64)
]
++ lib.optionals cudaSupport [
(lib.cmakeBool "ENABLE_CUDA" true)
(lib.cmakeFeature "CMAKE_CUDA_ARCHITECTURES" cudaPackages.flags.cmakeCudaArchitecturesString)
];
buildInputs =
lib.optionals stdenv.cc.isClang [
llvmPackages.openmp
zlib
bzip2
]
++ lib.optional enableMpi mpi
++ lib.optionals cudaSupport [
cudaPackages.cuda_cudart
cudaPackages.cuda_cccl
];
postInstall = ''
installShellCompletion --bash --cmd mmseqs $out/util/bash-completion.sh
rm -r $out/util/
'';
passthru.tests = {
example = runCommand "mmseqs2-test" { } ''
${lib.getExe finalAttrs.finalPackage} createdb ${finalAttrs.src}/examples/DB.fasta targetDB > $out
${lib.getExe finalAttrs.finalPackage} createindex targetDB tmp >> $out
${lib.getExe finalAttrs.finalPackage} easy-search ${finalAttrs.src}/examples/QUERY.fasta targetDB alnRes.m8 tmp >> $out
'';
};
meta = with lib; {
description = "Ultra fast and sensitive sequence search and clustering suite";
mainProgram = "mmseqs";
homepage = "https://mmseqs.com/";
license = licenses.mit;
maintainers = with maintainers; [ natsukium ];
platforms = platforms.unix;
};
})

View file

@ -17383,10 +17383,6 @@ with pkgs;
inherit (perlPackages) perl TextFormat;
};
mmseqs2 = callPackage ../applications/science/biology/mmseqs2 {
inherit (llvmPackages) openmp;
};
obitools3 = callPackage ../applications/science/biology/obitools/obitools3.nix { };
raxml-mpi = raxml.override { useMpi = true; };