about summary refs log tree commit diff
path: root/pkgs/tools/compression
diff options
context:
space:
mode:
authorSean Link <sean.link@lightdeckdx.com>2024-02-02 14:12:09 -0700
committerSean Link <sean.link@lightdeckdx.com>2024-02-02 14:12:09 -0700
commit6269f3116b5ad289bd09ac06b2769bb22d34b982 (patch)
tree6afd6d45b2f21334fad5e47f467b2c179c62a51b /pkgs/tools/compression
parent6a2365312cecd44a6844e216a3c4d261fb450907 (diff)
lzip: add mingw support
Part of a greater effort to get qtbase and qtmultimedia cross compiling
for windows.
Diffstat (limited to 'pkgs/tools/compression')
-rw-r--r--pkgs/tools/compression/lzip/default.nix4
-rw-r--r--pkgs/tools/compression/lzip/mingw-install-exe-file.patch13
2 files changed, 17 insertions, 0 deletions
diff --git a/pkgs/tools/compression/lzip/default.nix b/pkgs/tools/compression/lzip/default.nix
index 526e3f8c12fc3..4c2d678eefde2 100644
--- a/pkgs/tools/compression/lzip/default.nix
+++ b/pkgs/tools/compression/lzip/default.nix
@@ -15,6 +15,10 @@ stdenv.mkDerivation rec {
     sha256 = "sha256-R5LAR93xXvKdVbqOaKGiHgy3aS2H7N9yBEGYZFgvKA0=";
   };
 
+  patches = lib.optionals stdenv.hostPlatform.isMinGW [
+    ./mingw-install-exe-file.patch
+  ];
+
   configureFlags = [
     "CPPFLAGS=-DNDEBUG"
     "CFLAGS=-O3"
diff --git a/pkgs/tools/compression/lzip/mingw-install-exe-file.patch b/pkgs/tools/compression/lzip/mingw-install-exe-file.patch
new file mode 100644
index 0000000000000..b2b4b2be067e0
--- /dev/null
+++ b/pkgs/tools/compression/lzip/mingw-install-exe-file.patch
@@ -0,0 +1,13 @@
+diff --git a/Makefile.in b/Makefile.in
+index d07ad5a..1c15203 100644
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -64,7 +64,7 @@ install-strip-compress : install-bin-strip install-info-compress install-man-com
+ 
+ install-bin : all
+ 	if [ ! -d "$(DESTDIR)$(bindir)" ] ; then $(INSTALL_DIR) "$(DESTDIR)$(bindir)" ; fi
+-	$(INSTALL_PROGRAM) ./$(progname) "$(DESTDIR)$(bindir)/$(progname)"
++	$(INSTALL_PROGRAM) ./$(progname).exe "$(DESTDIR)$(bindir)/$(progname).exe"
+ 
+ install-bin-strip : all
+ 	$(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' install-bin