From ad1e109f49a3543ed32b9468a4fae11b9adcb74c Mon Sep 17 00:00:00 2001 From: Daniel Olsen Date: Sat, 16 Jan 2021 17:53:56 +0100 Subject: [PATCH] perl scripts metapixel --- pkgs/metapixel/default.nix | 17 ++++++++++++---- pkgs/metapixel/no-docbook.patch | 35 --------------------------------- 2 files changed, 13 insertions(+), 39 deletions(-) delete mode 100644 pkgs/metapixel/no-docbook.patch diff --git a/pkgs/metapixel/default.nix b/pkgs/metapixel/default.nix index a136dd9..6dfda74 100644 --- a/pkgs/metapixel/default.nix +++ b/pkgs/metapixel/default.nix @@ -1,4 +1,4 @@ -{stdenv, fetchFromGitHub, libpng, libjpeg, giflib, libxslt, pkg-config}: +{stdenv, fetchFromGitHub, libpng, libjpeg, giflib, perl, pkg-config}: stdenv.mkDerivation { pname = "metapixel"; @@ -12,10 +12,19 @@ stdenv.mkDerivation { sha256 = "0r7n3a6bvcxkbpda4mwmrpicii09iql5z69nkjqygkwxw7ny3309"; }; - patches = [ ./no-docbook.patch ]; + makeFlags = [ "PREFIX=build" "metapixel" ]; - nativeBuildInputs = [ libxslt pkg-config ]; - buildInputs = [ libpng libjpeg giflib ]; + #patches = [ ./no-docbook.patch ]; + + nativeBuildInputs = [ pkg-config ]; + buildInputs = [ libpng libjpeg giflib perl ]; + + installPhase = '' + mkdir -p $out/bin + cp metapixel $out/bin/metapixel + cp metapixel-prepare $out/bin/metapixel-prepare + cp metapixel-sizesort $out/bin/metapixel-sizesort + ''; meta = with stdenv.lib; { homepage = "https://github.com/schani/metapixel"; diff --git a/pkgs/metapixel/no-docbook.patch b/pkgs/metapixel/no-docbook.patch deleted file mode 100644 index 91e2f40..0000000 --- a/pkgs/metapixel/no-docbook.patch +++ /dev/null @@ -1,35 +0,0 @@ -diff --git a/Makefile b/Makefile -index 84c9373..53fa926 100644 ---- a/Makefile -+++ b/Makefile -@@ -1,4 +1,4 @@ --PREFIX = /usr/local -+PREFIX = $(out) - INSTALL = install - MANPAGE_XSL = /usr/share/xml/docbook/stylesheet/nwalsh/current/manpages/docbook.xsl - -@@ -33,8 +33,8 @@ all : metapixel convert metapixel-imagesize - metapixel : $(OBJS) librwimg - $(CC) $(LDOPTS) -o metapixel $(OBJS) rwimg/librwimg.a -lpng -ljpeg -lgif $(LIBFFM) -lm -lz - --metapixel.1 : metapixel.xml -- xsltproc --nonet $(MANPAGE_XSL) metapixel.xml -+#metapixel.1 : metapixel.xml -+# xsltproc --nonet $(MANPAGE_XSL) metapixel.xml - - convert : $(CONVERT_OBJS) - $(CC) $(LDOPTS) -o convert $(CONVERT_OBJS) -@@ -51,11 +51,11 @@ zoom : zoom.c librwimg - librwimg : - $(MAKE) CFLAGS="$(RWIMG_CFLAGS)" -C rwimg - --install : metapixel metapixel.1 -+install : metapixel #metapixel.1 - $(INSTALL) -d $(BINDIR) - $(INSTALL) metapixel $(BINDIR) - $(INSTALL) metapixel-prepare $(BINDIR) -- $(INSTALL) metapixel.1 $(MANDIR)/man1 -+# $(INSTALL) metapixel.1 $(MANDIR)/man1 - $(INSTALL) metapixel-imagesize $(BINDIR) - $(INSTALL) metapixel-sizesort $(BINDIR) -