1 { stdenv, lib, fetchFromGitHub, cmake, gfortran, gtest, openmp }:
3 stdenv.mkDerivation rec {
5 version = "2.1.0"; # N.B: if you change this, please update: pythonPackages.spglib
7 src = fetchFromGitHub {
11 hash = "sha256-EL3jkzyurc8fnzk9kAdTaEtLfLlLtmaVDFwChfCDOrQ=";
14 nativeBuildInputs = [ cmake gfortran gtest ];
16 buildInputs = lib.optionals stdenv.isDarwin [ openmp ];
18 cmakeFlags = [ "-DSPGLIB_WITH_Fortran=On" ];
23 description = "C library for finding and handling crystal symmetries";
24 homepage = "https://spglib.github.io/spglib/";
25 changelog = "https://github.com/spglib/spglib/raw/v${version}/ChangeLog";
26 license = licenses.bsd3;
27 maintainers = [ maintainers.markuskowa ];
28 platforms = platforms.all;