diff options
author | Justin Bedo <cu@cua0.org> | 2022-03-14 13:45:57 +1100 |
---|---|---|
committer | Justin Bedo <cu@cua0.org> | 2022-03-14 13:50:02 +1100 |
commit | 95d69d32d9236943da3abf62d3dd2b2274770f88 (patch) | |
tree | 24a4ecf5d04067c29c739e3f6fae2f6149bd90b3 /pkgs/development | |
parent | f67c61e0d507ed352e33be64d0d02b9d6be0488b (diff) |
rPackages.RNifti: use nixpkgs zlib
Build was failing due to incorrect zlib macro expansion. Patch to use nixpkgs zlib rather than vendored copy.
Diffstat (limited to 'pkgs/development')
-rw-r--r-- | pkgs/development/r-modules/default.nix | 4 | ||||
-rw-r--r-- | pkgs/development/r-modules/patches/RNifti.patch | 33 |
2 files changed, 37 insertions, 0 deletions
diff --git a/pkgs/development/r-modules/default.nix b/pkgs/development/r-modules/default.nix index 0afdfa8798677..c079c45318d73 100644 --- a/pkgs/development/r-modules/default.nix +++ b/pkgs/development/r-modules/default.nix @@ -1297,6 +1297,10 @@ let geomorph = old.geomorph.overrideDerivation (attrs: { RGL_USE_NULL = "true"; }); + + RNifti = old.RNifti.overrideDerivation (attrs: { + patches = [ ./patches/RNifti.patch ]; + }); }; in self diff --git a/pkgs/development/r-modules/patches/RNifti.patch b/pkgs/development/r-modules/patches/RNifti.patch new file mode 100644 index 0000000000000..e8f3561e75085 --- /dev/null +++ b/pkgs/development/r-modules/patches/RNifti.patch @@ -0,0 +1,33 @@ +diff --git a/configure.ac b/configure.ac +index 05e8a1e..2dcde81 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -17,16 +17,5 @@ CXXFLAGS=`"${R_HOME}/bin/R" CMD config CXXFLAGS` + CPPFLAGS=`"${R_HOME}/bin/R" CMD config CPPFLAGS` + LDFLAGS=`"${R_HOME}/bin/R" CMD config LDFLAGS` + +-# Checks for libraries. +-ZLIB_FLAGS="-Izlib" +-ZLIB_OBJECTS=`ls -1 src/zlib/*.c | sed 's/^src\///' | sed 's/\\.c$/\\.o/'` +-AC_SEARCH_LIBS([inflate], [z], [ +- ZLIB_FLAGS="" +- ZLIB_OBJECTS="" +-]) +- +-AC_SUBST(ZLIB_FLAGS) +-AC_SUBST(ZLIB_OBJECTS) +- + AC_CONFIG_FILES([src/Makevars]) + AC_OUTPUT +diff --git a/src/Makevars.in b/src/Makevars.in +index 77da572..358cc1d 100644 +--- a/src/Makevars.in ++++ b/src/Makevars.in +@@ -1,5 +1,5 @@ +-PKG_CPPFLAGS = -DNDEBUG -DHAVE_ZLIB -DUSING_R -DRNIFTI_NIFTILIB_DEDUPLICATE -I../inst/include @ZLIB_FLAGS@ ++PKG_CPPFLAGS = -DNDEBUG -DHAVE_ZLIB -DUSING_R -DRNIFTI_NIFTILIB_DEDUPLICATE -I../inst/include + PKG_LIBS = @LIBS@ + + NIFTI_OBJECTS = znzlib/znzlib.o niftilib/nifti1_io.o niftilib/nifti2_io.o +-OBJECTS = main.o zzz.o @ZLIB_OBJECTS@ $(NIFTI_OBJECTS) ++OBJECTS = main.o zzz.o $(NIFTI_OBJECTS) |