at 24.11-pre 30 lines 878 B view raw
1{ stdenv, lib, fetchFromGitHub, cmake, gfortran, gtest, openmp }: 2 3stdenv.mkDerivation rec { 4 pname = "spglib"; 5 version = "2.4.0"; # N.B: if you change this, please update: pythonPackages.spglib 6 7 src = fetchFromGitHub { 8 owner = "spglib"; 9 repo = "spglib"; 10 rev = "v${version}"; 11 hash = "sha256-Y6WkN3Q1q4h2TqrlKSKFmFxQZQWKmleRHV74PmYyw2A="; 12 }; 13 14 nativeBuildInputs = [ cmake gfortran gtest ]; 15 16 buildInputs = lib.optionals stdenv.isDarwin [ openmp ]; 17 18 cmakeFlags = [ "-DSPGLIB_WITH_Fortran=On" ]; 19 20 doCheck = true; 21 22 meta = with lib; { 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; 29 }; 30}