2023-11-16 04:20:00 +00:00
|
|
|
{ stdenv, lib, fetchFromGitHub, cmake, gfortran, gtest, openmp }:
|
2021-02-05 17:12:51 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "spglib";
|
2024-07-27 06:49:29 +00:00
|
|
|
version = "2.5.0"; # N.B: if you change this, please update: pythonPackages.spglib
|
2021-02-05 17:12:51 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2022-05-18 14:49:53 +00:00
|
|
|
owner = "spglib";
|
2021-02-05 17:12:51 +00:00
|
|
|
repo = "spglib";
|
|
|
|
rev = "v${version}";
|
2024-07-27 06:49:29 +00:00
|
|
|
hash = "sha256-/PG+ewlxIyf5Au2kVvsAYCfGZgUOOEpA1uATu15ut+M=";
|
2021-02-05 17:12:51 +00:00
|
|
|
};
|
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
nativeBuildInputs = [ cmake gfortran gtest ];
|
2021-02-05 17:12:51 +00:00
|
|
|
|
2024-09-26 11:04:55 +00:00
|
|
|
buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ openmp ];
|
2022-05-18 14:49:53 +00:00
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
cmakeFlags = [ "-DSPGLIB_WITH_Fortran=On" ];
|
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
doCheck = true;
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "C library for finding and handling crystal symmetries";
|
2022-05-18 14:49:53 +00:00
|
|
|
homepage = "https://spglib.github.io/spglib/";
|
|
|
|
changelog = "https://github.com/spglib/spglib/raw/v${version}/ChangeLog";
|
2021-02-05 17:12:51 +00:00
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = [ maintainers.markuskowa ];
|
2021-03-15 08:37:03 +00:00
|
|
|
platforms = platforms.all;
|
2021-02-05 17:12:51 +00:00
|
|
|
};
|
|
|
|
}
|