2023-11-13 08:15:01 +00:00
|
|
|
{ stdenv, lib, fetchFromGitHub, cmake, gfortran, gtest, openmp }:
|
2021-01-25 10:54:30 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "spglib";
|
2024-02-11 10:14:55 +00:00
|
|
|
version = "2.3.1"; # N.B: if you change this, please update: pythonPackages.spglib
|
2021-01-25 10:54:30 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2022-05-06 04:20:00 +00:00
|
|
|
owner = "spglib";
|
2021-01-25 10:54:30 +00:00
|
|
|
repo = "spglib";
|
|
|
|
rev = "v${version}";
|
2024-02-11 10:14:55 +00:00
|
|
|
hash = "sha256-MOre1LGf7Li+tAqtzpuEvAX6q/P0ueDlMXhhmtiE+jw=";
|
2021-01-25 10:54:30 +00:00
|
|
|
};
|
|
|
|
|
2023-11-13 08:15:01 +00:00
|
|
|
nativeBuildInputs = [ cmake gfortran gtest ];
|
2021-01-25 10:54:30 +00:00
|
|
|
|
2022-05-06 04:20:00 +00:00
|
|
|
buildInputs = lib.optionals stdenv.isDarwin [ openmp ];
|
|
|
|
|
2023-11-13 08:15:01 +00:00
|
|
|
cmakeFlags = [ "-DSPGLIB_WITH_Fortran=On" ];
|
|
|
|
|
2023-09-17 10:42:08 +00:00
|
|
|
doCheck = true;
|
|
|
|
|
2021-01-25 10:54:30 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "C library for finding and handling crystal symmetries";
|
2022-05-06 04:20:00 +00:00
|
|
|
homepage = "https://spglib.github.io/spglib/";
|
|
|
|
changelog = "https://github.com/spglib/spglib/raw/v${version}/ChangeLog";
|
2021-01-25 10:54:30 +00:00
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = [ maintainers.markuskowa ];
|
2021-03-12 05:22:10 +00:00
|
|
|
platforms = platforms.all;
|
2021-01-25 10:54:30 +00:00
|
|
|
};
|
|
|
|
}
|