nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 stdenv,
4 buildPythonPackage,
5 fetchFromGitHub,
6
7 # build-system
8 setuptools,
9
10 # dependencies
11 numpy,
12 scipy,
13 spglib,
14
15 # tests
16 pytestCheckHook,
17}:
18
19buildPythonPackage rec {
20 pname = "symfc";
21 version = "1.6.0";
22 pyproject = true;
23
24 src = fetchFromGitHub {
25 owner = "symfc";
26 repo = "symfc";
27 tag = "v${version}";
28 hash = "sha256-YDVO1/vt30ZaBOTCaYBtr3fkcuJmPa8Eg72k3XWpacg=";
29 };
30
31 build-system = [
32 setuptools
33 ];
34
35 dependencies = [
36 numpy
37 scipy
38 spglib
39 ];
40
41 pythonImportsCheck = [ "symfc" ];
42
43 nativeCheckInputs = [
44 pytestCheckHook
45 ];
46
47 disabledTests = lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64) [
48 # assert (np.float64(0.5555555555555556) == 1.0 ± 1.0e-06
49 "test_fc_basis_set_o3"
50 ];
51
52 meta = {
53 description = "Generate symmetrized force constants";
54 homepage = "https://github.com/symfc/symfc";
55 changelog = "https://github.com/symfc/symfc/releases/tag/v${version}";
56 license = lib.licenses.bsd3;
57 maintainers = with lib.maintainers; [ GaetanLepage ];
58 };
59}