libint: init at 2.6.0 (#128083)

Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>

authored by

markuskowa
Sandro
Robert Hensing
and committed by
GitHub
a06aeca3 ebed6e79

+174
+76
pkgs/development/libraries/libint/default.nix
··· 1 + { lib, stdenv, fetchFromGitHub, autoconf, automake, libtool 2 + , python3, perl, gmpxx, mpfr, boost, eigen, gfortran 3 + , enableFMA ? false 4 + }: 5 + 6 + stdenv.mkDerivation rec { 7 + pname = "libint2"; 8 + version = "2.6.0"; 9 + 10 + src = fetchFromGitHub { 11 + owner = "evaleev"; 12 + repo = "libint"; 13 + rev = "v${version}"; 14 + sha256 = "0pbc2j928jyffhdp4x5bkw68mqmx610qqhnb223vdzr0n2yj5y19"; 15 + }; 16 + 17 + patches = [ 18 + ./fix-paths.patch 19 + ]; 20 + 21 + nativeBuildInputs = [ 22 + autoconf 23 + automake 24 + libtool 25 + gfortran 26 + mpfr 27 + python3 28 + perl 29 + gmpxx 30 + ]; 31 + 32 + buildInputs = [ boost ]; 33 + 34 + enableParallelBuilding = true; 35 + 36 + doCheck = true; 37 + 38 + configureFlags = [ 39 + "--enable-eri=2" 40 + "--enable-eri3=2" 41 + "--enable-eri2=2" 42 + "--with-eri-max-am=7,5,4" 43 + "--with-eri-opt-am=3" 44 + "--with-eri3-max-am=7" 45 + "--with-eri2-max-am=7" 46 + "--with-g12-max-am=5" 47 + "--with-g12-opt-am=3" 48 + "--with-g12dkh-max-am=5" 49 + "--with-g12dkh-opt-am=3" 50 + "--enable-contracted-ints" 51 + "--enable-shared" 52 + ] ++ lib.optional enableFMA "--enable-fma"; 53 + 54 + preConfigure = '' 55 + ./autogen.sh 56 + ''; 57 + 58 + postBuild = '' 59 + # build the fortran interface file 60 + cd export/fortran 61 + make libint_f.o ENABLE_FORTRAN=yes 62 + cd ../.. 63 + ''; 64 + 65 + postInstall = '' 66 + cp export/fortran/libint_f.mod $out/include/ 67 + ''; 68 + 69 + meta = with lib; { 70 + description = "Library for the evaluation of molecular integrals of many-body operators over Gaussian functions"; 71 + homepage = "https://github.com/evaleev/libint"; 72 + license = with licenses; [ lgpl3Only gpl3Only ]; 73 + maintainers = [ maintainers.markuskowa ]; 74 + platforms = platforms.linux; 75 + }; 76 + }
+96
pkgs/development/libraries/libint/fix-paths.patch
··· 1 + diff --git a/export/fortran/Makefile b/export/fortran/Makefile 2 + index 62d8711..a83edc7 100644 3 + --- a/export/fortran/Makefile 4 + +++ b/export/fortran/Makefile 5 + @@ -1,12 +1,14 @@ 6 + -TOPDIR = .. 7 + -SRCDIR = .. 8 + +TOPDIR = ../.. 9 + +SRCDIR = ../.. 10 + 11 + --include ../MakeSuffixRules 12 + --include ../MakeVars 13 + --include ../MakeVars.features 14 + +-include ../../lib/MakeSuffixRules 15 + +-include ../../src/bin/MakeVars 16 + +-include ../../src/lib/libint/MakeVars.features 17 + 18 + -FCFLAGS := -I../include -I../include/libint2 -D__COMPILING_LIBINT2=1 $(FCFLAGS) 19 + -COMPUTE_LIB = -L../lib -lint2 20 + +FCFLAGS := -I../../include -I../../include/libint2 -D__COMPILING_LIBINT2=1 $(FCFLAGS) 21 + +COMPUTE_LIB = -L../../lib -lint2 22 + + 23 + +CXXCPP = cc -E -I../../include/libint2 24 + 25 + .PHONY: clean distclean default make_test check_test 26 + 27 + @@ -28,7 +30,7 @@ libint2_types_f.h: $(TOPDIR)/include/libint2.h.i 28 + 29 + fortran_example.o: libint_f.o 30 + 31 + -fortran_incldefs.h: $(TOPDIR)/include/libint2_types.h 32 + +fortran_incldefs.h: $(TOPDIR)/include/libint2/libint2_types.h 33 + grep '^#' $< | grep -v '#include' > $@ 34 + 35 + fortran_example: fortran_example.o libint_f.o 36 + diff --git a/src/bin/libint/Makefile b/src/bin/libint/Makefile 37 + index 406306c..bd8a695 100644 38 + --- a/src/bin/libint/Makefile 39 + +++ b/src/bin/libint/Makefile 40 + @@ -59,7 +59,7 @@ test: $(TESTCXXOBJ) $(LIBTARGET) 41 + $(CXX) -o $@ $(CXXFLAGS) $(LDFLAGS) $^ $(SYSLIBS) 42 + 43 + $(LIBTARGET): $(LIBOBJ) 44 + - /bin/rm -f $@ 45 + + rm -f $@ 46 + $(AR) $(ARFLAGS) $@ $(LIBOBJ) 47 + $(RANLIB) $@ 48 + 49 + @@ -102,7 +102,7 @@ ifneq ($(CXXDEPENDSUF),none) 50 + %.d: %.cc 51 + $(CXXDEPEND) $(CXXDEPENDFLAGS) -c $(CPPFLAGS) $(CXXFLAGS) $< > /dev/null 52 + sed 's/^$*.o/$*.$(OBJSUF) $*.d/g' < $(*F).$(CXXDEPENDSUF) > $(@F) 53 + - /bin/rm -f $(*F).$(CXXDEPENDSUF) 54 + + rm -f $(*F).$(CXXDEPENDSUF) 55 + else 56 + %.d: %.cc 57 + $(CXXDEPEND) $(CXXDEPENDFLAGS) -c $(CPPFLAGS) $(CXXFLAGS) $< | sed 's/^$*.o/$*.$(OBJSUF) $*.d/g' > $(@F) 58 + diff --git a/tests/eri/Makefile b/tests/eri/Makefile 59 + index 6223e4f..05909dc 100644 60 + --- a/tests/eri/Makefile 61 + +++ b/tests/eri/Makefile 62 + @@ -62,7 +62,7 @@ ifneq ($(CXXDEPENDSUF),none) 63 + %.d: %.cc 64 + $(CXXDEPEND) $(CXXDEPENDFLAGS) -c $(CPPFLAGS) $(CXXFLAGS) $< > /dev/null 65 + sed 's/^$*.o/$*.$(OBJSUF) $*.d/g' < $(*F).$(CXXDEPENDSUF) > $(@F) 66 + - /bin/rm -f $(*F).$(CXXDEPENDSUF) 67 + + rm -f $(*F).$(CXXDEPENDSUF) 68 + else 69 + %.d: %.cc 70 + $(CXXDEPEND) $(CXXDEPENDFLAGS) -c $(CPPFLAGS) $(CXXFLAGS) $< | sed 's/^$*.o/$*.$(OBJSUF) $*.d/g' > $(@F) 71 + diff --git a/tests/hartree-fock/Makefile b/tests/hartree-fock/Makefile 72 + index aaebadc..4971472 100644 73 + --- a/tests/hartree-fock/Makefile 74 + +++ b/tests/hartree-fock/Makefile 75 + @@ -95,7 +95,7 @@ ifneq ($(CXXDEPENDSUF),none) 76 + %.d:: %.cc 77 + $(CXXDEPEND) $(CXXDEPENDFLAGS) -c $(CPPFLAGS) $(CXXFLAGS) $< > /dev/null 78 + sed 's/^$*.o/$*.$(OBJSUF) $*.d/g' < $(*F).$(CXXDEPENDSUF) > $(@F) 79 + - /bin/rm -f $(*F).$(CXXDEPENDSUF) 80 + + rm -f $(*F).$(CXXDEPENDSUF) 81 + else 82 + %.d:: %.cc 83 + $(CXXDEPEND) $(CXXDEPENDFLAGS) -c $(CPPFLAGS) $(CXXFLAGS) $< | sed 's/^$*.o/$*.$(OBJSUF) $*.d/g' > $(@F) 84 + diff --git a/tests/unit/Makefile b/tests/unit/Makefile 85 + index f2d9400..da9d82b 100644 86 + --- a/tests/unit/Makefile 87 + +++ b/tests/unit/Makefile 88 + @@ -93,7 +93,7 @@ ifneq ($(CXXDEPENDSUF),none) 89 + %.d:: %.cc 90 + $(CXXDEPEND) $(CXXDEPENDFLAGS) -c $(CPPFLAGS) $(CXXGENFLAGS) $< > /dev/null 91 + sed 's/^$*.o/$*.$(OBJSUF) $*.d/g' < $(*F).$(CXXDEPENDSUF) > $(@F) 92 + - /bin/rm -f $(*F).$(CXXDEPENDSUF) 93 + + rm -f $(*F).$(CXXDEPENDSUF) 94 + else 95 + %.d:: %.cc 96 + $(CXXDEPEND) $(CXXDEPENDFLAGS) -c $(CPPFLAGS) $(CXXGENFLAGS) $< | sed 's/^$*.o/$*.$(OBJSUF) $*.d/g' > $(@F)
+2
pkgs/top-level/all-packages.nix
··· 6621 6621 6622 6622 libinsane = callPackage ../development/libraries/libinsane { }; 6623 6623 6624 + libint = callPackage ../development/libraries/libint {}; 6625 + 6624 6626 libipfix = callPackage ../development/libraries/libipfix { }; 6625 6627 6626 6628 libircclient = callPackage ../development/libraries/libircclient { };