diff options
author | Alyssa Ross <hi@alyssa.is> | 2021-06-30 13:44:37 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2021-06-30 13:44:37 +0000 |
commit | 16f676d6bbd4f930b0017ccb20cebe5a29e17545 (patch) | |
tree | 0d554b4f16bdef502035b743457fc29ffcc5e7f7 /nixpkgs/pkgs/development/libraries/libint | |
parent | e7caacc4c122b7641bb66a4c2595289347a4996c (diff) | |
parent | 3a8d7958a610cd3fec3a6f424480f91a1b259185 (diff) | |
download | nixlib-16f676d6bbd4f930b0017ccb20cebe5a29e17545.tar nixlib-16f676d6bbd4f930b0017ccb20cebe5a29e17545.tar.gz nixlib-16f676d6bbd4f930b0017ccb20cebe5a29e17545.tar.bz2 nixlib-16f676d6bbd4f930b0017ccb20cebe5a29e17545.tar.lz nixlib-16f676d6bbd4f930b0017ccb20cebe5a29e17545.tar.xz nixlib-16f676d6bbd4f930b0017ccb20cebe5a29e17545.tar.zst nixlib-16f676d6bbd4f930b0017ccb20cebe5a29e17545.zip |
Merge commit '3a8d7958a610cd3fec3a6f424480f91a1b259185'
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/libint')
-rw-r--r-- | nixpkgs/pkgs/development/libraries/libint/default.nix | 76 | ||||
-rw-r--r-- | nixpkgs/pkgs/development/libraries/libint/fix-paths.patch | 96 |
2 files changed, 172 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/libraries/libint/default.nix b/nixpkgs/pkgs/development/libraries/libint/default.nix new file mode 100644 index 000000000000..6df3d5a7eb3e --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/libint/default.nix @@ -0,0 +1,76 @@ +{ lib, stdenv, fetchFromGitHub, autoconf, automake, libtool +, python3, perl, gmpxx, mpfr, boost, eigen, gfortran +, enableFMA ? false +}: + +stdenv.mkDerivation rec { + pname = "libint2"; + version = "2.6.0"; + + src = fetchFromGitHub { + owner = "evaleev"; + repo = "libint"; + rev = "v${version}"; + sha256 = "0pbc2j928jyffhdp4x5bkw68mqmx610qqhnb223vdzr0n2yj5y19"; + }; + + patches = [ + ./fix-paths.patch + ]; + + nativeBuildInputs = [ + autoconf + automake + libtool + gfortran + mpfr + python3 + perl + gmpxx + ]; + + buildInputs = [ boost ]; + + enableParallelBuilding = true; + + doCheck = true; + + configureFlags = [ + "--enable-eri=2" + "--enable-eri3=2" + "--enable-eri2=2" + "--with-eri-max-am=7,5,4" + "--with-eri-opt-am=3" + "--with-eri3-max-am=7" + "--with-eri2-max-am=7" + "--with-g12-max-am=5" + "--with-g12-opt-am=3" + "--with-g12dkh-max-am=5" + "--with-g12dkh-opt-am=3" + "--enable-contracted-ints" + "--enable-shared" + ] ++ lib.optional enableFMA "--enable-fma"; + + preConfigure = '' + ./autogen.sh + ''; + + postBuild = '' + # build the fortran interface file + cd export/fortran + make libint_f.o ENABLE_FORTRAN=yes + cd ../.. + ''; + + postInstall = '' + cp export/fortran/libint_f.mod $out/include/ + ''; + + meta = with lib; { + description = "Library for the evaluation of molecular integrals of many-body operators over Gaussian functions"; + homepage = "https://github.com/evaleev/libint"; + license = with licenses; [ lgpl3Only gpl3Only ]; + maintainers = [ maintainers.markuskowa ]; + platforms = platforms.linux; + }; +} diff --git a/nixpkgs/pkgs/development/libraries/libint/fix-paths.patch b/nixpkgs/pkgs/development/libraries/libint/fix-paths.patch new file mode 100644 index 000000000000..2cf178e81f3a --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/libint/fix-paths.patch @@ -0,0 +1,96 @@ +diff --git a/export/fortran/Makefile b/export/fortran/Makefile +index 62d8711..a83edc7 100644 +--- a/export/fortran/Makefile ++++ b/export/fortran/Makefile +@@ -1,12 +1,14 @@ +-TOPDIR = .. +-SRCDIR = .. ++TOPDIR = ../.. ++SRCDIR = ../.. + +--include ../MakeSuffixRules +--include ../MakeVars +--include ../MakeVars.features ++-include ../../lib/MakeSuffixRules ++-include ../../src/bin/MakeVars ++-include ../../src/lib/libint/MakeVars.features + +-FCFLAGS := -I../include -I../include/libint2 -D__COMPILING_LIBINT2=1 $(FCFLAGS) +-COMPUTE_LIB = -L../lib -lint2 ++FCFLAGS := -I../../include -I../../include/libint2 -D__COMPILING_LIBINT2=1 $(FCFLAGS) ++COMPUTE_LIB = -L../../lib -lint2 ++ ++CXXCPP = cc -E -I../../include/libint2 + + .PHONY: clean distclean default make_test check_test + +@@ -28,7 +30,7 @@ libint2_types_f.h: $(TOPDIR)/include/libint2.h.i + + fortran_example.o: libint_f.o + +-fortran_incldefs.h: $(TOPDIR)/include/libint2_types.h ++fortran_incldefs.h: $(TOPDIR)/include/libint2/libint2_types.h + grep '^#' $< | grep -v '#include' > $@ + + fortran_example: fortran_example.o libint_f.o +diff --git a/src/bin/libint/Makefile b/src/bin/libint/Makefile +index 406306c..bd8a695 100644 +--- a/src/bin/libint/Makefile ++++ b/src/bin/libint/Makefile +@@ -59,7 +59,7 @@ test: $(TESTCXXOBJ) $(LIBTARGET) + $(CXX) -o $@ $(CXXFLAGS) $(LDFLAGS) $^ $(SYSLIBS) + + $(LIBTARGET): $(LIBOBJ) +- /bin/rm -f $@ ++ rm -f $@ + $(AR) $(ARFLAGS) $@ $(LIBOBJ) + $(RANLIB) $@ + +@@ -102,7 +102,7 @@ ifneq ($(CXXDEPENDSUF),none) + %.d: %.cc + $(CXXDEPEND) $(CXXDEPENDFLAGS) -c $(CPPFLAGS) $(CXXFLAGS) $< > /dev/null + sed 's/^$*.o/$*.$(OBJSUF) $*.d/g' < $(*F).$(CXXDEPENDSUF) > $(@F) +- /bin/rm -f $(*F).$(CXXDEPENDSUF) ++ rm -f $(*F).$(CXXDEPENDSUF) + else + %.d: %.cc + $(CXXDEPEND) $(CXXDEPENDFLAGS) -c $(CPPFLAGS) $(CXXFLAGS) $< | sed 's/^$*.o/$*.$(OBJSUF) $*.d/g' > $(@F) +diff --git a/tests/eri/Makefile b/tests/eri/Makefile +index 6223e4f..05909dc 100644 +--- a/tests/eri/Makefile ++++ b/tests/eri/Makefile +@@ -62,7 +62,7 @@ ifneq ($(CXXDEPENDSUF),none) + %.d: %.cc + $(CXXDEPEND) $(CXXDEPENDFLAGS) -c $(CPPFLAGS) $(CXXFLAGS) $< > /dev/null + sed 's/^$*.o/$*.$(OBJSUF) $*.d/g' < $(*F).$(CXXDEPENDSUF) > $(@F) +- /bin/rm -f $(*F).$(CXXDEPENDSUF) ++ rm -f $(*F).$(CXXDEPENDSUF) + else + %.d: %.cc + $(CXXDEPEND) $(CXXDEPENDFLAGS) -c $(CPPFLAGS) $(CXXFLAGS) $< | sed 's/^$*.o/$*.$(OBJSUF) $*.d/g' > $(@F) +diff --git a/tests/hartree-fock/Makefile b/tests/hartree-fock/Makefile +index aaebadc..4971472 100644 +--- a/tests/hartree-fock/Makefile ++++ b/tests/hartree-fock/Makefile +@@ -95,7 +95,7 @@ ifneq ($(CXXDEPENDSUF),none) + %.d:: %.cc + $(CXXDEPEND) $(CXXDEPENDFLAGS) -c $(CPPFLAGS) $(CXXFLAGS) $< > /dev/null + sed 's/^$*.o/$*.$(OBJSUF) $*.d/g' < $(*F).$(CXXDEPENDSUF) > $(@F) +- /bin/rm -f $(*F).$(CXXDEPENDSUF) ++ rm -f $(*F).$(CXXDEPENDSUF) + else + %.d:: %.cc + $(CXXDEPEND) $(CXXDEPENDFLAGS) -c $(CPPFLAGS) $(CXXFLAGS) $< | sed 's/^$*.o/$*.$(OBJSUF) $*.d/g' > $(@F) +diff --git a/tests/unit/Makefile b/tests/unit/Makefile +index f2d9400..da9d82b 100644 +--- a/tests/unit/Makefile ++++ b/tests/unit/Makefile +@@ -93,7 +93,7 @@ ifneq ($(CXXDEPENDSUF),none) + %.d:: %.cc + $(CXXDEPEND) $(CXXDEPENDFLAGS) -c $(CPPFLAGS) $(CXXGENFLAGS) $< > /dev/null + sed 's/^$*.o/$*.$(OBJSUF) $*.d/g' < $(*F).$(CXXDEPENDSUF) > $(@F) +- /bin/rm -f $(*F).$(CXXDEPENDSUF) ++ rm -f $(*F).$(CXXDEPENDSUF) + else + %.d:: %.cc + $(CXXDEPEND) $(CXXDEPENDFLAGS) -c $(CPPFLAGS) $(CXXGENFLAGS) $< | sed 's/^$*.o/$*.$(OBJSUF) $*.d/g' > $(@F) |