2021-05-14 23:27:16 +02:00
|
|
|
{ lib, stdenv, fetchFromGitHub, makeWrapper, zlib, perl, perlPackages, openmp }:
|
2019-06-13 14:35:13 +02:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
version = "4.8.1";
|
|
|
|
pname = "cd-hit";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "weizhongli";
|
|
|
|
repo = "cdhit";
|
|
|
|
rev = "V${version}";
|
|
|
|
sha256 = "032nva6iiwmw59gjipm1mv0xlcckhxsf45mc2qbnv19lbis0q22i";
|
|
|
|
};
|
|
|
|
|
2021-08-02 19:05:00 +02:00
|
|
|
propagatedBuildInputs = [ perl perlPackages.TextNSP perlPackages.ImageMagick ];
|
2019-06-13 14:35:13 +02:00
|
|
|
|
|
|
|
nativeBuildInputs = [ zlib makeWrapper ];
|
2021-05-14 23:27:16 +02:00
|
|
|
buildInputs = lib.optional stdenv.cc.isClang openmp;
|
2019-06-13 14:35:13 +02:00
|
|
|
|
2021-05-14 23:27:16 +02:00
|
|
|
makeFlags = [
|
|
|
|
"CC=${stdenv.cc.targetPrefix}c++" # remove once https://github.com/weizhongli/cdhit/pull/114 is merged
|
|
|
|
"PREFIX=$(out)/bin"
|
|
|
|
];
|
2019-06-13 14:35:13 +02:00
|
|
|
|
|
|
|
preInstall = "mkdir -p $out/bin";
|
|
|
|
|
|
|
|
postFixup = ''
|
|
|
|
wrapProgram $out/bin/FET.pl --prefix PERL5LIB : $PERL5LIB
|
|
|
|
wrapProgram $out/bin/plot_2d.pl --prefix PERL5LIB : $PERL5LIB
|
|
|
|
wrapProgram $out/bin/clstr_list_sort.pl --prefix PERL5LIB : $PERL5LIB
|
|
|
|
'';
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2019-06-13 14:35:13 +02:00
|
|
|
description = "Clustering and comparing protein or nucleotide sequences";
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "http://weizhongli-lab.org/cd-hit/";
|
2019-06-13 14:35:13 +02:00
|
|
|
license = licenses.gpl2;
|
|
|
|
maintainers = [ maintainers.bzizou ];
|
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|