1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 setuptools,
6 cython,
7 freesasa,
8 pytestCheckHook,
9}:
10
11buildPythonPackage rec {
12 pname = "freesasa";
13 version = "2.2.1";
14 pyproject = true;
15
16 src = fetchFromGitHub {
17 owner = "freesasa";
18 repo = "freesasa-python";
19 tag = "v${version}";
20 hash = "sha256-/7ymItwXOemY0+IL0k6rWnJI8fAwTFjNXzTV+uf9x9A=";
21 };
22
23 postPatch = ''
24 ln -s ${freesasa.src}/* lib/
25 '';
26
27 build-system = [
28 cython
29 setuptools
30 ];
31
32 env.USE_CYTHON = true;
33
34 pythonImportsCheck = [ "freesasa" ];
35
36 nativeCheckInputs = [ pytestCheckHook ];
37
38 enabledTestPaths = [ "test.py" ];
39
40 meta = {
41 description = "FreeSASA Python Module";
42 homepage = "https://github.com/freesasa/freesasa-python";
43 changelog = "https://github.com/freesasa/freesasa-python/blob/${src.rev}/CHANGELOG.md";
44 license = lib.licenses.mit;
45 maintainers = with lib.maintainers; [ natsukium ];
46 };
47}