1{
2 lib,
3 stdenv,
4 fetchPypi,
5 buildPythonPackage,
6 isPy27,
7 pythonAtLeast,
8 setuptools,
9 numpy,
10 scipy,
11 matplotlib,
12 flask,
13 pillow,
14 psycopg2,
15 tkinter,
16 pytestCheckHook,
17 pytest-mock,
18 pytest-xdist,
19}:
20
21buildPythonPackage rec {
22 pname = "ase";
23 version = "3.24.0";
24 pyproject = true;
25
26 disabled = isPy27;
27
28 src = fetchPypi {
29 inherit pname version;
30 hash = "sha256-msyT1tqvSM0nuETFb4v0lCi52wVC+qPMMNnVuOGEIZU=";
31 };
32
33 build-system = [ setuptools ];
34
35 dependencies =
36 [
37 numpy
38 scipy
39 matplotlib
40 flask
41 pillow
42 psycopg2
43 ]
44 ++ lib.optionals stdenv.hostPlatform.isDarwin [
45 tkinter
46 ];
47
48 nativeCheckInputs = [
49 pytestCheckHook
50 pytest-mock
51 pytest-xdist
52 ];
53
54 disabledTests = [
55 "test_fundamental_params"
56 "test_ase_bandstructure"
57 "test_imports"
58 "test_units"
59 "test_favicon"
60 "test_vibrations_methods" # missing attribute
61 "test_jmol_roundtrip" # missing attribute
62 "test_pw_input_write_nested_flat" # Did not raise DeprecationWarning
63 "test_fix_scaled" # Did not raise UserWarning
64 "test_ipi_protocol" # flaky
65 ] ++ lib.optionals (pythonAtLeast "3.12") [ "test_info_calculators" ];
66
67 preCheck = ''
68 export PATH="$out/bin:$PATH"
69 '';
70
71 pythonImportsCheck = [ "ase" ];
72
73 meta = with lib; {
74 description = "Atomic Simulation Environment";
75 homepage = "https://wiki.fysik.dtu.dk/ase/";
76 license = licenses.lgpl21Plus;
77 maintainers = [ ];
78 };
79}