about summary refs log tree commit diff
path: root/pkgs/applications/science/biology/dssp/default.nix
blob: 59da360d1b6dfabc39586f97651bf68b7720954b (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
{ lib, stdenv, fetchFromGitHub, cmake, libcifpp, libmcfp, zlib }:
let
  libcifpp' = libcifpp.overrideAttrs (oldAttrs:  rec {
    # dssp 4.2.2.1 requires specific version "5.0.8" of libcifpp
    version = "5.0.8";
    src = fetchFromGitHub {
      inherit (oldAttrs.src) owner repo;
      rev = "v${version}";
      sha256 = "sha256-KJGcopGhCWSl+ElG3BPJjBf/kvYJowOHxto6Ci1IMco=";
    };
  });
in

stdenv.mkDerivation rec {
  pname = "dssp";
  version = "4.2.2.1";

  src = fetchFromGitHub {
    owner = "PDB-REDO";
    repo = pname;
    rev = "v${version}";
    sha256 = "sha256-vmGvC5d8LTo+pcY9sxwj0d6JvH8Lyk+QSOZo5raBci4=";
  };

  nativeBuildInputs = [ cmake ];

  buildInputs = [ libcifpp' libmcfp zlib ];

  meta = with lib; {
    description = "Calculate the most likely secondary structure assignment given the 3D structure of a protein";
    homepage = "https://github.com/PDB-REDO/dssp";
    license = licenses.bsd2;
    maintainers = with maintainers; [ natsukium ];
    platforms = platforms.unix;
  };
}