about summary refs log tree commit diff
path: root/pkgs/development/python-modules/meeko/default.nix
blob: 8e452324b7fe6ae00106f8c36657b2ff07792d34 (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
{ lib
, buildPythonPackage
, fetchFromGitHub
, numpy
, pytestCheckHook
, pythonOlder
, rdkit
, scipy
}:

buildPythonPackage rec {
  pname = "meeko";
  version = "0.4.0";
  format = "setuptools";

  disabled = pythonOlder "3.5";

  src = fetchFromGitHub {
    owner = "forlilab";
    repo = "Meeko";
    rev = "refs/tags/v${version}";
    hash = "sha256-BCkKRwz3jK5rNAMtKcGxuvfdIFxRRJpABcedyd1zSKE=";
  };

  postPatch = ''
    substituteInPlace setup.py \
      --replace "python_requires='>=3.5.*'" "python_requires='>=3.5'"
  '';

  propagatedBuildInputs = [
    # setup.py only requires numpy but others are needed at runtime
    numpy
    rdkit
    scipy
  ];

  nativeCheckInputs = [
    pytestCheckHook
  ];

  pythonImportsCheck = [
    "meeko"
  ];

  meta = {
    description = "Python package for preparing small molecule for docking";
    homepage = "https://github.com/forlilab/Meeko";
    changelog = "https://github.com/forlilab/Meeko/releases/tag/${src.rev}";
    license = lib.licenses.lgpl21Only;
    maintainers = with lib.maintainers; [ natsukium ];
  };
}