Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 stdenv, 3 lib, 4 fetchFromGitHub, 5 cmake, 6 gfortran, 7 gtest, 8 openmp, 9}: 10 11stdenv.mkDerivation rec { 12 pname = "spglib"; 13 version = "2.6.0"; # N.B: if you change this, please update: pythonPackages.spglib 14 15 src = fetchFromGitHub { 16 owner = "spglib"; 17 repo = "spglib"; 18 rev = "v${version}"; 19 hash = "sha256-rmQYFFfpyUhT9pfQZk1fN5tZWTg40wwtszhPhiZpXs4="; 20 }; 21 22 nativeBuildInputs = [ 23 cmake 24 gfortran 25 gtest 26 ]; 27 28 buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ openmp ]; 29 30 cmakeFlags = [ "-DSPGLIB_WITH_Fortran=On" ]; 31 32 doCheck = true; 33 34 meta = with lib; { 35 description = "C library for finding and handling crystal symmetries"; 36 homepage = "https://spglib.github.io/spglib/"; 37 changelog = "https://github.com/spglib/spglib/raw/v${version}/ChangeLog"; 38 license = licenses.bsd3; 39 maintainers = [ maintainers.markuskowa ]; 40 platforms = platforms.all; 41 }; 42}