about summary refs log tree commit diff
path: root/pkgs/development/python-modules/pylion/default.nix
blob: 10cfd173b66de3d207105e76ab981767b93b636f (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
{ lib
, buildPythonPackage
, fetchFromBitbucket
, h5py
, termcolor
, pexpect
, jinja2
, sphinxHook
, sphinx-rtd-theme
}:

buildPythonPackage {
  pname = "pylion";
  version = "0.5.3";
  format = "setuptools";

  src = fetchFromBitbucket {
    owner = "dtrypogeorgos";
    repo = "pylion";
    # Version is set in setup.cfg, but not in a git tag / bitbucket release
    rev = "3e6b96b542b97107c622d66b0be0551c3bd9f948";
    hash = "sha256-c0UOv2Vlv9wJ6YW+QdHinhpdaclUh3As5TDvyoRhpSI=";
  };

  # Docs are not available online, besides the article:
  # http://dx.doi.org/10.1016/j.cpc.2020.107187
  nativeBuildInputs = [
    sphinxHook
    sphinx-rtd-theme
  ];

  propagatedBuildInputs = [
    h5py
    termcolor
    pexpect
    jinja2
  ];

  pythonImportsCheck = [ "pylion" ];

  # Tests fail from some reason - some files seem to be missing from the repo.
  doCheck = false;

  postInstall = ''
    mkdir -p $out/share/doc/$name
    cp -r examples $out/share/doc/$name/examples
  '';

  meta = with lib; {
    description = "A LAMMPS wrapper for molecular dynamics simulations of trapped ions";
    homepage = "https://bitbucket.org/dtrypogeorgos/pylion";
    license = licenses.mit;
    maintainers = with maintainers; [ doronbehar ];
  };
}