summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/symfc/default.nix
blob: 754754875390b3720b5518d47eff87e0ec4ed0b0 (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
57
58
59
{
  lib,
  stdenv,
  buildPythonPackage,
  fetchFromGitHub,

  # build-system
  setuptools,

  # dependencies
  numpy,
  scipy,
  spglib,

  # tests
  pytestCheckHook,
}:

buildPythonPackage rec {
  pname = "symfc";
  version = "1.6.0";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "symfc";
    repo = "symfc";
    tag = "v${version}";
    hash = "sha256-YDVO1/vt30ZaBOTCaYBtr3fkcuJmPa8Eg72k3XWpacg=";
  };

  build-system = [
    setuptools
  ];

  dependencies = [
    numpy
    scipy
    spglib
  ];

  pythonImportsCheck = [ "symfc" ];

  nativeCheckInputs = [
    pytestCheckHook
  ];

  disabledTests = lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64) [
    # assert (np.float64(0.5555555555555556) == 1.0 ± 1.0e-06
    "test_fc_basis_set_o3"
  ];

  meta = {
    description = "Generate symmetrized force constants";
    homepage = "https://github.com/symfc/symfc";
    changelog = "https://github.com/symfc/symfc/releases/tag/v${version}";
    license = lib.licenses.bsd3;
    maintainers = with lib.maintainers; [ GaetanLepage ];
  };
}