nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{ lib
2, ase
3, buildPythonPackage
4, cython
5, datamodeldict
6, fetchFromGitHub
7, matplotlib
8, numericalunits
9, numpy
10, pandas
11, phonopy
12, potentials
13, pymatgen
14, pytest
15, pythonOlder
16, pythonAtLeast
17, requests
18, scipy
19, toolz
20, xmltodict
21}:
22
23buildPythonPackage rec {
24 version = "1.4.4";
25 pname = "atomman";
26 format = "setuptools";
27
28 disabled = pythonOlder "3.6" || pythonAtLeast "3.10";
29
30 src = fetchFromGitHub {
31 owner = "usnistgov";
32 repo = "atomman";
33 rev = "v${version}";
34 hash = "sha256-iLAB0KMtrTCyGpx+81QfHDPVDhq8OA6CDL/ipVRpyo0=";
35 };
36
37 propagatedBuildInputs = [
38 cython
39 datamodeldict
40 matplotlib
41 numericalunits
42 numpy
43 pandas
44 potentials
45 requests
46 scipy
47 toolz
48 xmltodict
49 ];
50
51 checkInputs = [
52 ase
53 phonopy
54 pymatgen
55 pytest
56 ];
57
58 checkPhase = ''
59 # pytestCheckHook doesn't work
60 pytest tests -k "not test_rootdir and not test_version \
61 and not test_atomic_mass and not imageflags \
62 and not test_build_unit and not test_set_and_get_in_units \
63 and not test_set_literal and not test_scalar_model " \
64 --ignore tests/plot/test_interpolate.py \
65 --ignore tests/tools/test_vect_angle.py
66 '';
67
68 pythonImportsCheck = [
69 "atomman"
70 ];
71
72 meta = with lib; {
73 description = "Atomistic Manipulation Toolkit";
74 homepage = "https://github.com/usnistgov/atomman/";
75 license = licenses.mit;
76 maintainers = with maintainers; [ costrouc ];
77 };
78}