about summary refs log tree commit diff
path: root/pkgs/development/python-modules/pdbfixer/default.nix
blob: 0042364a3218feb519a67238b60951af5062446c (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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,
  setuptools,
  wheel,
  numpy,
  openmm,
  pytestCheckHook,
}:

buildPythonPackage rec {
  pname = "pdbfixer";
  version = "1.9";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "openmm";
    repo = "pdbfixer";
    rev = version;
    hash = "sha256-ZXQWdNQyoVgjpZj/Wimcfwcbxk3CIvg3n5S1glNYUP4=";
  };

  nativeBuildInputs = [
    setuptools
    wheel
  ];

  propagatedBuildInputs = [
    numpy
    openmm
  ];

  nativeCheckInputs = [ pytestCheckHook ];

  preCheck = ''
    export PATH=$out/bin:$PATH
  '';

  disabledTests = [
    # require network access
    "test_build_and_simulate"
    "test_mutate_1"
    "test_mutate_2"
    "test_mutate_3_fails"
    "test_mutate_4_fails"
    "test_mutate_5_fails"
    "test_mutate_multiple_copies_of_chain_A"
    "test_pdbid"
    "test_url"
  ];

  pythonImportsCheck = [ "pdbfixer" ];

  meta = with lib; {
    description = "PDBFixer fixes problems in PDB files";
    homepage = "https://github.com/openmm/pdbfixer";
    changelog = "https://github.com/openmm/pdbfixer/releases/tag/${src.rev}";
    license = licenses.mit;
    maintainers = with maintainers; [ natsukium ];
    mainProgram = "pdbfixer";
  };
}