summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/pylion/default.nix
blob: a1c431c09996d3f21248c353dac6720b98d4e1bc (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
48
49
50
51
52
53
54
55
56
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,
  h5py,
  termcolor,
  pexpect,
  jinja2,
  sphinxHook,
  sphinx-rtd-theme,
}:

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

  src = fetchFromGitHub {
    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 = {
    description = "LAMMPS wrapper for molecular dynamics simulations of trapped ions";
    homepage = "https://github.com/dtrypogeorgos/pylion";
    license = lib.licenses.mit;
    maintainers = with lib.maintainers; [ doronbehar ];
  };
}