about summary refs log tree commit diff
path: root/nixpkgs/pkgs/applications/science/biology/hh-suite/default.nix
blob: 2e01ace7d0f1a9b0d1da0ca0483852d14ad25cdd (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
{ lib
, stdenv
, fetchFromGitHub
, cmake
, xxd
, enableMpi ? false
, mpi
, openmp
}:
stdenv.mkDerivation rec {
  pname = "hh-suite";
  version = "3.3.0";

  src = fetchFromGitHub {
    owner = "soedinglab";
    repo = "hh-suite";
    rev = "v${version}";
    hash = "sha256-kjNqJddioCZoh/cZL3YNplweIGopWIGzCYQOnKDqZmw=";
  };

  nativeBuildInputs = [ cmake xxd ];
  cmakeFlags = lib.optional stdenv.hostPlatform.isx86 "-DHAVE_SSE2=1"
    ++ lib.optional stdenv.hostPlatform.isAarch "-DHAVE_ARM8=1"
    ++ lib.optional stdenv.hostPlatform.avx2Support "-DHAVE_AVX2=1"
    ++ lib.optional stdenv.hostPlatform.sse4_1Support "-DHAVE_SSE4_1=1";

  buildInputs = lib.optional stdenv.cc.isClang openmp
    ++ lib.optional enableMpi mpi;

  meta = with lib; {
    description = "Remote protein homology detection suite";
    homepage = "https://github.com/soedinglab/hh-suite";
    license = licenses.gpl3Plus;
    maintainers = with maintainers; [ natsukium ];
    platforms = platforms.unix;
  };
}