From 1b59ae0b838666fe1f59ba1f291f5147f3ee64b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Llu=C3=ADs=20Batlle=20i=20Rossell?= Date: Mon, 9 Aug 2010 20:59:38 +0000 Subject: [PATCH] Adding 'mupdf', a lightweight PDF 1.7 viewer As a side effect, I add openjpeg and jbig2dec. svn path=/nixpkgs/trunk/; revision=23069 --- pkgs/applications/misc/mupdf/default.nix | 24 +++++++++++++++++++ .../libraries/jbig2dec/default.nix | 16 +++++++++++++ .../libraries/openjpeg/default.nix | 24 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 7 ++++++ 4 files changed, 71 insertions(+) create mode 100644 pkgs/applications/misc/mupdf/default.nix create mode 100644 pkgs/development/libraries/jbig2dec/default.nix create mode 100644 pkgs/development/libraries/openjpeg/default.nix diff --git a/pkgs/applications/misc/mupdf/default.nix b/pkgs/applications/misc/mupdf/default.nix new file mode 100644 index 00000000000..15d2ac98804 --- /dev/null +++ b/pkgs/applications/misc/mupdf/default.nix @@ -0,0 +1,24 @@ +{ stdenv, fetchurl, pkgconfig, zlib, freetype, libjpeg, jbig2dec, openjpeg +, libX11, libXext }: +stdenv.mkDerivation rec { + name = "mupdf-0.6"; + + src = fetchurl { + url = "http://mupdf.com/download/source/${name}.tar.gz"; + sha256 = "01cn2kz4zx53qhqvbxy8xd7xqbh58kpid8ykvx5hz7pf2gqw91vg"; + }; + + buildInputs = [ pkgconfig zlib freetype libjpeg jbig2dec openjpeg libX11 libXext ]; + + preBuild = '' + export makeFlags="prefix=$out" + ''; + + meta = { + homepage = http://mupdf.com/; + description = "Lightweight PDF viewer and toolkit written in portable C"; + license = "GPLv3+"; + maintainers = with stdenv.lib.maintainers; [ viric ]; + platforms = with stdenv.lib.platforms; linux; + }; +} diff --git a/pkgs/development/libraries/jbig2dec/default.nix b/pkgs/development/libraries/jbig2dec/default.nix new file mode 100644 index 00000000000..60c6e9922a4 --- /dev/null +++ b/pkgs/development/libraries/jbig2dec/default.nix @@ -0,0 +1,16 @@ +{ stdenv, fetchurl }: + +stdenv.mkDerivation { + name = "jbig2dec-0.11"; + + src = fetchurl { + url = http://ghostscript.com/~giles/jbig2/jbig2dec/jbig2dec-0.11.tar.gz; + sha256 = "1ffhgmf2fqzk0h4k736pp06z7q5y4x41fg844bd6a9vgncq86bby"; + }; + + meta = { + homepage = http://jbig2dec.sourceforge.net/; + description = "Decoder implementation of the JBIG2 image compression format"; + license = "GPLv2+"; + }; +} diff --git a/pkgs/development/libraries/openjpeg/default.nix b/pkgs/development/libraries/openjpeg/default.nix new file mode 100644 index 00000000000..e54f29003f4 --- /dev/null +++ b/pkgs/development/libraries/openjpeg/default.nix @@ -0,0 +1,24 @@ +{ stdenv, fetchurl }: + +stdenv.mkDerivation { + name = "openjpeg-1.2"; + + src = fetchurl { + url = http://www.openjpeg.org/openjpeg_v1_2.tar.gz; + sha256 = "1i72i0hhssgg6vfkaw3gpwf5ld65g9s77ay8pxd4any1xy54qa90"; + }; + + patchPhase = '' + sed -i -e 's/-o root -g [^ ]\+//' Makefile Makefile.osx + ''; + + preInstall = '' + export installFlags="PREFIX=$out" + ''; + + meta = { + homepage = http://www.openjpeg.org/; + description = "Open-source JPEG 2000 codec written in C language"; + license = "BSD"; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 6cbc65c0875..db0a0416777 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -3079,6 +3079,8 @@ let jasper = callPackage ../development/libraries/jasper { }; + jbig2dec = callPackage ../development/libraries/jbig2dec { }; + jetty_gwt = callPackage ../development/libraries/java/jetty-gwt { }; jetty_util = callPackage ../development/libraries/java/jetty-util { }; @@ -3533,6 +3535,8 @@ let opensc = opensc_0_11_7; }; + openjpeg = callPackage ../development/libraries/openjpeg { }; + openssl = callPackage ../development/libraries/openssl { fetchurl = fetchurlBoot; }; @@ -5813,6 +5817,9 @@ let msmtp = callPackage ../applications/networking/msmtp { }; + mupdf = callPackage ../applications/misc/mupdf { + }; + mythtv = callPackage ../applications/video/mythtv { qt3 = qt3mysql; };