mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-31 01:04:25 +00:00
rPackages.RNifti: use nixpkgs zlib
Build was failing due to incorrect zlib macro expansion. Patch to use nixpkgs zlib rather than vendored copy.
This commit is contained in:
parent
f67c61e0d5
commit
95d69d32d9
@ -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
|
||||
|
33
pkgs/development/r-modules/patches/RNifti.patch
Normal file
33
pkgs/development/r-modules/patches/RNifti.patch
Normal file
@ -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)
|
Loading…
Reference in New Issue
Block a user