1{ lib
2, stdenv
3, boost
4, cmake
5, fetchFromGitHub
6, eigen
7, zlib
8}:
9
10stdenv.mkDerivation (finalAttrs: {
11 pname = "libcifpp";
12 version = "7.0.4";
13
14 src = fetchFromGitHub {
15 owner = "PDB-REDO";
16 repo = "libcifpp";
17 rev = "refs/tags/v${finalAttrs.version}";
18 hash = "sha256-/dX77KRYmTIj8jxRzQRlpG/ktqDL1jjySux/JqHnE3I=";
19 };
20
21 nativeBuildInputs = [
22 cmake
23 ];
24
25 cmakeFlags = [
26 # disable network access
27 "-DCIFPP_DOWNLOAD_CCD=OFF"
28 ];
29
30 buildInputs = [
31 boost
32 eigen
33 zlib
34 ];
35
36 # cmake requires the existence of this directory when building dssp
37 postInstall = ''
38 mkdir -p $out/share/libcifpp
39 '';
40
41 meta = with lib; {
42 description = "Manipulate mmCIF and PDB files";
43 homepage = "https://github.com/PDB-REDO/libcifpp";
44 changelog = "https://github.com/PDB-REDO/libcifpp/releases/tag/${finalAttrs.src.rev}";
45 license = licenses.bsd2;
46 maintainers = with maintainers; [ natsukium ];
47 platforms = platforms.unix;
48 };
49})