1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 fetchpatch,
6 numpy,
7 pytestCheckHook,
8 pythonOlder,
9 rdkit,
10 scipy,
11}:
12
13buildPythonPackage rec {
14 pname = "meeko";
15 version = "0.5.0";
16 format = "setuptools";
17
18 disabled = pythonOlder "3.5";
19
20 src = fetchFromGitHub {
21 owner = "forlilab";
22 repo = "Meeko";
23 rev = "refs/tags/v${version}";
24 hash = "sha256-pngFu6M63W26P7wd6FUNLuf0NikxtRtVR/pnR5PR6Wo=";
25 };
26
27 patches = [
28 # https://github.com/forlilab/Meeko/issues/60
29 (fetchpatch {
30 name = "fix-unknown-sidechains.patch";
31 url = "https://github.com/forlilab/Meeko/commit/28c9fbfe3b778aa1bd5e8d7e4f3e6edf44633a0c.patch";
32 hash = "sha256-EJbLnbKTTOsTxKtLiU7Af07yjfY63ungGUHbGvrm0AU=";
33 })
34 (fetchpatch {
35 name = "add-test-data.patch";
36 url = "https://github.com/forlilab/Meeko/commit/57b52e3afffb82685cdd1ef1bf6820d55924b97a.patch";
37 hash = "sha256-nLnyIjT68iaY3lAEbH9EJ5jZflhxABBwDqw8kaRKf3k=";
38 })
39 ];
40
41 propagatedBuildInputs = [
42 # setup.py only requires numpy but others are needed at runtime
43 numpy
44 rdkit
45 scipy
46 ];
47
48 nativeCheckInputs = [ pytestCheckHook ];
49
50 pythonImportsCheck = [ "meeko" ];
51
52 meta = {
53 description = "Python package for preparing small molecule for docking";
54 homepage = "https://github.com/forlilab/Meeko";
55 changelog = "https://github.com/forlilab/Meeko/releases/tag/${src.rev}";
56 license = lib.licenses.lgpl21Only;
57 maintainers = with lib.maintainers; [ natsukium ];
58 };
59}