Skip to content

Commit

Permalink
Fix compilation of minizip on NixOS
Browse files Browse the repository at this point in the history
NixOS does not have `/bin/rm`, and assuming this path to the binary is
not portable. Changed the third-party Makefiles to check for `rm` the
same way as the project Makefile; i.e. by using `PATH`.

This fixes compilation on NixOS, and possibly other systems with
isolated packages.
  • Loading branch information
Mange authored and Paxa committed Dec 29, 2023
1 parent 02d6b10 commit 788c942
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion libxlsxwriter/third_party/minizip/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,4 @@ all: ioapi.o zip.o ioapi.so zip.so
$(Q)$(CC) $(FPIC) -c $(CFLAGS) $< -o $@

clean:
$(Q)/bin/rm -f *.o *.so
$(Q)rm -f *.o *.so
3 changes: 3 additions & 0 deletions libxlsxwriter/third_party/minizip/README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,6 @@ contrib/minizip/ directory of zlib-1.2.8.

The files zip.h and ioapi.h have had a small number of comments modifed from
C++ to C style to avoid warnings with -pedantic -ansi.

In addition, the Makefile has been changed to not assume rm(1) is installed at
/bin/rm, mainly for NixOS and similar systems.
2 changes: 1 addition & 1 deletion libxlsxwriter/third_party/tmpfileplus/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,4 @@ all: tmpfileplus.o tmpfileplus.so
$(Q)$(CC) $(FPIC) -c $(CFLAGS) $< -o $@

clean:
$(Q)/bin/rm -f *.o *.so
$(Q)rm -f *.o *.so

0 comments on commit 788c942

Please sign in to comment.