diff --git a/default.nix b/default.nix index 9987ac0..661139f 100644 --- a/default.nix +++ b/default.nix @@ -39,6 +39,8 @@ in # radical-native = pkgs.callPackage ./pkgs/radical-native { }; photini = pkgs.libsForQt5.callPackage ./pkgs/photini { }; + metapixel = pkgs.callPackage ./pkgs/metapixel { }; + plotbitrate = pkgs.callPackage ./pkgs/plotbitrate { }; # wii-u-gc-adapter = pkgs.callPackage ./pkgs/wii-u-gc-adapter { }; diff --git a/pkgs/metapixel/default.nix b/pkgs/metapixel/default.nix new file mode 100644 index 0000000..a136dd9 --- /dev/null +++ b/pkgs/metapixel/default.nix @@ -0,0 +1,26 @@ +{stdenv, fetchFromGitHub, libpng, libjpeg, giflib, libxslt, pkg-config}: + +stdenv.mkDerivation { + pname = "metapixel"; + version = "1.0.2"; + + src = fetchFromGitHub { + owner = "schani"; + repo = "metapixel"; + rev = "98ee9daa093b6c334941242e63f90b1c2876eb4f"; + fetchSubmodules = true; + sha256 = "0r7n3a6bvcxkbpda4mwmrpicii09iql5z69nkjqygkwxw7ny3309"; + }; + + patches = [ ./no-docbook.patch ]; + + nativeBuildInputs = [ libxslt pkg-config ]; + buildInputs = [ libpng libjpeg giflib ]; + + meta = with stdenv.lib; { + homepage = "https://github.com/schani/metapixel"; + description = "Tool for generating photomosaics"; + license = licenses.gpl2; + platforms = platforms.linux; + }; +} diff --git a/pkgs/metapixel/no-docbook.patch b/pkgs/metapixel/no-docbook.patch new file mode 100644 index 0000000..91e2f40 --- /dev/null +++ b/pkgs/metapixel/no-docbook.patch @@ -0,0 +1,35 @@ +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) +