summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/freesasa/default.nix
blob: 2eec87c973725521153184be931dfa31d73f46bc (plain)
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
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,
  setuptools,
  cython,
  freesasa,
  pytestCheckHook,
}:

buildPythonPackage rec {
  pname = "freesasa";
  version = "2.2.1";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "freesasa";
    repo = "freesasa-python";
    tag = "v${version}";
    hash = "sha256-/7ymItwXOemY0+IL0k6rWnJI8fAwTFjNXzTV+uf9x9A=";
  };

  postPatch = ''
    ln -s ${freesasa.src}/* lib/
  '';

  build-system = [
    cython
    setuptools
  ];

  env.USE_CYTHON = true;

  pythonImportsCheck = [ "freesasa" ];

  nativeCheckInputs = [ pytestCheckHook ];

  enabledTestPaths = [ "test.py" ];

  meta = {
    description = "FreeSASA Python Module";
    homepage = "https://github.com/freesasa/freesasa-python";
    changelog = "https://github.com/freesasa/freesasa-python/blob/${src.rev}/CHANGELOG.md";
    license = lib.licenses.mit;
    maintainers = with lib.maintainers; [ natsukium ];
  };
}