diff options
Diffstat (limited to 'pkgs/development/libraries')
29 files changed, 239 insertions, 206 deletions
diff --git a/pkgs/development/libraries/atk/default.nix b/pkgs/development/libraries/atk/default.nix index cea207f27bc51..f4c33c869112c 100644 --- a/pkgs/development/libraries/atk/default.nix +++ b/pkgs/development/libraries/atk/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, pkgconfig, perl, glib, libintlOrEmpty }: +{ stdenv, fetchurl, pkgconfig, perl, glib, libintlOrEmpty, gobjectIntrospection }: stdenv.mkDerivation rec { name = "atk-2.8.0"; @@ -12,7 +12,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ pkgconfig perl ]; - propagatedBuildInputs = [ glib ]; + propagatedBuildInputs = [ glib gobjectIntrospection /*ToDo: why propagate*/ ]; postInstall = "rm -rf $out/share/gtk-doc"; diff --git a/pkgs/development/libraries/cairo/default.nix b/pkgs/development/libraries/cairo/default.nix index a09903f7ea91b..59a0a13158570 100644 --- a/pkgs/development/libraries/cairo/default.nix +++ b/pkgs/development/libraries/cairo/default.nix @@ -34,8 +34,6 @@ stdenv.mkDerivation rec { ++ optional pdfSupport "--enable-pdf" ; - NIX_CFLAGS_COMPILE = "-I${pixman}/include/pixman-1"; - preConfigure = # On FreeBSD, `-ldl' doesn't exist. (stdenv.lib.optionalString stdenv.isFreeBSD @@ -56,7 +54,11 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; # The default `--disable-gtk-doc' is ignored. - postInstall = "rm -rf $out/share/gtk-doc"; + postInstall = "rm -rf $out/share/gtk-doc" + + stdenv.lib.optionalString stdenv.isDarwin ('' + #newline + '' + glib.flattenInclude + ); meta = { description = "A 2D graphics library with support for multiple output devices"; diff --git a/pkgs/development/libraries/clutter-gtk/0.10.8.nix b/pkgs/development/libraries/clutter-gtk/0.10.8.nix index a8433fb5fea34..00a4edd2a9884 100644 --- a/pkgs/development/libraries/clutter-gtk/0.10.8.nix +++ b/pkgs/development/libraries/clutter-gtk/0.10.8.nix @@ -11,6 +11,8 @@ stdenv.mkDerivation rec { propagatedBuildInputs = [ clutter gtk ]; nativeBuildInputs = [ pkgconfig ]; + configureFlags = [ "--disable-introspection" ]; # not needed anywhere AFAIK + postBuild = "rm -rf $out/share/gtk-doc"; meta = { diff --git a/pkgs/development/libraries/clutter-gtk/default.nix b/pkgs/development/libraries/clutter-gtk/default.nix index 8fe087cbfbce5..5873244611170 100644 --- a/pkgs/development/libraries/clutter-gtk/default.nix +++ b/pkgs/development/libraries/clutter-gtk/default.nix @@ -11,6 +11,8 @@ stdenv.mkDerivation rec { propagatedBuildInputs = [ clutter gtk3 ]; nativeBuildInputs = [ pkgconfig ]; + configureFlags = [ "--disable-introspection" ]; # not needed anywhere AFAIK + postBuild = "rm -rf $out/share/gtk-doc"; meta = { diff --git a/pkgs/development/libraries/clutter/default.nix b/pkgs/development/libraries/clutter/default.nix index 36eb93532d927..33bc196143b10 100644 --- a/pkgs/development/libraries/clutter/default.nix +++ b/pkgs/development/libraries/clutter/default.nix @@ -15,6 +15,8 @@ stdenv.mkDerivation { atk json_glib ]; + configureFlags = [ "--disable-introspection" ]; # not needed anywhere AFAIK + meta = { description = "Clutter, a library for creating fast, dynamic graphical user interfaces"; diff --git a/pkgs/development/libraries/fontconfig/default.nix b/pkgs/development/libraries/fontconfig/default.nix index e3b0a54ee82eb..b2afc427b4c0e 100644 --- a/pkgs/development/libraries/fontconfig/default.nix +++ b/pkgs/development/libraries/fontconfig/default.nix @@ -11,7 +11,7 @@ stdenv.mkDerivation rec { infinality_patch = with freetype.infinality; if useInfinality then let subvers = "1"; in fetchurl { - url = "${base_URL}/fontconfig-infinality-1-${vers}_${subvers}.tar.bz2"; + url = http://www.infinality.net/fedora/linux/zips/fontconfig-infinality-1-20130104_1.tar.bz2; sha256 = "1fm5xx0mx2243jrq5rxk4v0ajw2nawpj23399h710bx6hd1rviq7"; } else null; diff --git a/pkgs/development/libraries/freetype/default.nix b/pkgs/development/libraries/freetype/default.nix index 8fa75425544f4..235d7e7237468 100644 --- a/pkgs/development/libraries/freetype/default.nix +++ b/pkgs/development/libraries/freetype/default.nix @@ -10,17 +10,7 @@ assert !(useEncumberedCode && useInfinality); # probably wouldn't make sense let - version = "2.4.11"; - - infinality = rec { - inherit useInfinality; - vers = "20130104"; - subvers = "04"; - sha256 = "0dqglig34lfcw0w6sm6vmich0pcvq303vyh8jzqapvxgvrpr2156"; - - base_URL = "http://www.infinality.net/fedora/linux/zips"; - url = "${base_URL}/freetype-infinality-${version}-${vers}_${subvers}-x86_64.tar.bz2"; - }; + version = "2.4.12"; in @@ -29,12 +19,14 @@ stdenv.mkDerivation rec { src = fetchurl { url = "mirror://sourceforge/freetype/${name}.tar.bz2"; - sha256 = "0gxyzxqpyf8g85y6g1zc1wqrh71prbbk8xfw4m8rwzb4ck5hp7gg"; + sha256 = "10akr2c37iv9y7fkgwp2szgwjyl2g6qmk9z1m596iaw9cr41g2m7"; }; - infinality_patch = if useInfinality - then fetchurl { inherit (infinality) url sha256; } - else null; + infinality_patch = + if useInfinality then fetchurl { + url = http://www.infinality.net/fedora/linux/zips/freetype-infinality-2.4.12-20130514_01-x86_64.tar.bz2; + sha256 = "1lg2nzvxmwzwdfhxranw8iyflhr72cw9p11rkpgq1scxbp37668m"; + } else null; configureFlags = "--disable-static"; @@ -68,7 +60,7 @@ stdenv.mkDerivation rec { configureFlags = "--disable-static CC_BUILD=gcc"; }; - passthru = { inherit infinality; }; # for fontconfig + passthru.infinality.useInfinality = useInfinality; # for fontconfig meta = { description = "A font rendering engine"; diff --git a/pkgs/development/libraries/gdk-pixbuf/default.nix b/pkgs/development/libraries/gdk-pixbuf/default.nix index 3a22bb4c3c1ab..6ad30f66e03c8 100644 --- a/pkgs/development/libraries/gdk-pixbuf/default.nix +++ b/pkgs/development/libraries/gdk-pixbuf/default.nix @@ -1,22 +1,24 @@ { stdenv, fetchurl, pkgconfig, glib, libtiff, libjpeg, libpng, libX11, xz -, jasper, libintlOrEmpty }: +, jasper, libintlOrEmpty, gobjectIntrospection }: stdenv.mkDerivation rec { - name = "gdk-pixbuf-2.28.1"; + name = "gdk-pixbuf-2.28.2"; src = fetchurl { url = "mirror://gnome/sources/gdk-pixbuf/2.28/${name}.tar.xz"; - sha256 = "1fy2a05xhfg7gy4l4aajsbmgj62zxhikdxqh6bicihxmzm1vg85y"; + sha256 = "05s6ksvy1yan6h6zny9n3bmvygcnzma6ljl6i0z9cci2xg116c8q"; }; # !!! We might want to factor out the gdk-pixbuf-xlib subpackage. buildInputs = [ libX11 libintlOrEmpty ]; - nativeBuildInputs = [ pkgconfig ]; + nativeBuildInputs = [ pkgconfig gobjectIntrospection ]; propagatedBuildInputs = [ glib libtiff libjpeg libpng jasper ]; - configureFlags = "--with-libjasper --with-x11"; + configureFlags = "--with-libjasper --with-x11" + + stdenv.lib.optionalString (gobjectIntrospection != null) " --enable-introspection=yes" + ; postInstall = "rm -rf $out/share/gtk-doc"; diff --git a/pkgs/development/libraries/glew/default.nix b/pkgs/development/libraries/glew/default.nix index ebd60f6105766..14b44801e76ef 100644 --- a/pkgs/development/libraries/glew/default.nix +++ b/pkgs/development/libraries/glew/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, mesa, x11, libXmu, libXi }: +{ stdenv, fetchurl, mesa_glu, x11, libXmu, libXi }: stdenv.mkDerivation rec { name = "glew-1.9.0"; @@ -8,7 +8,8 @@ stdenv.mkDerivation rec { sha256 = "11xpmsw7m5qn7y8fa2ihhqcislz1bdd83mp99didd5ac84756dlv"; }; - buildInputs = [ mesa x11 libXmu libXi ]; + buildInputs = [ x11 libXmu libXi ]; + propagatedBuildInputs = [ mesa_glu ]; # GL/glew.h includes GL/glu.h patchPhase = '' sed -i 's|lib64|lib|' config/Makefile.linux diff --git a/pkgs/development/libraries/glib/default.nix b/pkgs/development/libraries/glib/default.nix index b5e2b1e43b215..119584deb1eb6 100644 --- a/pkgs/development/libraries/glib/default.nix +++ b/pkgs/development/libraries/glib/default.nix @@ -1,5 +1,5 @@ -{ stdenv, fetchurl, pkgconfig, gettext, perl, libiconvOrEmpty, zlib, libffi -, python, pcre, libelf, libintlOrEmpty }: +{ stdenv, fetchurl, pkgconfig, gettext, perl, python, autoconf, automake, libtool +, libiconvOrEmpty, libintlOrEmpty, zlib, libffi, pcre, libelf, dbus }: # TODO: # * Add gio-module-fam @@ -12,41 +12,47 @@ # $out/bin/gtester-report' to postInstall if this is solved let - # some packages don't get "Cflags" from pkgconfig correctly - # and then fail to build when directly including like <glib/...> + # Some packages don't get "Cflags" from pkgconfig correctly + # and then fail to build when directly including like <glib/...>. + # This is intended to be run in postInstall of any package + # which has $out/include/ containing just some disjunct directories. flattenInclude = '' - for dir in $out/include/*; do - cp -r $dir/* "$out/include/" + for dir in "$out"/include/*; do + cp -r "$dir"/* "$out/include/" rm -r "$dir" ln -s . "$dir" done - ln -sr -t "$out/include/" $out/lib/*/include/* 2>/dev/null || true + ln -sr -t "$out/include/" "$out"/lib/*/include/* 2>/dev/null || true ''; in +with { inherit (stdenv.lib) optionalString; }; stdenv.mkDerivation rec { - name = "glib-2.36.1"; + name = "glib-2.36.4"; src = fetchurl { url = "mirror://gnome/sources/glib/2.36/${name}.tar.xz"; - sha256 = "090bw5par3dfy5m6dhq393pmy92zpw3d7rgbzqjc14jfg637bqvx"; + sha256 = "0zmdbkg2yjyxdl72w34lxvrssbzqzdficskkfn22s0994dad4m7n"; }; - # configure script looks for d-bus but it is only needed for tests - buildInputs = [ libelf ] ++ libintlOrEmpty; + # configure script looks for d-bus but it is (probably) only needed for tests + buildInputs = [ libelf ]; - nativeBuildInputs = [ perl pkgconfig gettext python ]; + # I don't know why the autotools are needed now, even without modifying configure scripts + nativeBuildInputs = [ pkgconfig gettext perl python ] ++ [ autoconf automake libtool ]; - propagatedBuildInputs = [ pcre zlib libffi ] ++ libiconvOrEmpty; + propagatedBuildInputs = [ pcre zlib libffi ] ++ libiconvOrEmpty ++ libintlOrEmpty; + preConfigure = "autoreconf -fi"; configureFlags = "--with-pcre=system --disable-fam"; - postConfigure = "sed '/SANE_MALLOC_PROTOS/s,^,//,' -i config.h"; - - NIX_CFLAGS_COMPILE = stdenv.lib.optionalString stdenv.isDarwin "-lintl"; + NIX_CFLAGS_COMPILE = optionalString stdenv.isDarwin "-lintl"; enableParallelBuilding = true; + doCheck = false; # ToDo: fix the remaining problems, so we have checked glib by default + LD_LIBRARY_PATH = optionalString doCheck "${stdenv.gcc.gcc}/lib"; + postInstall = ''rm -rvf $out/share/gtk-doc''; passthru = { @@ -69,4 +75,3 @@ stdenv.mkDerivation rec { ''; }; } - diff --git a/pkgs/development/libraries/gobject-introspection/default.nix b/pkgs/development/libraries/gobject-introspection/default.nix index 99a80640bb8d1..6a2caa281366e 100644 --- a/pkgs/development/libraries/gobject-introspection/default.nix +++ b/pkgs/development/libraries/gobject-introspection/default.nix @@ -1,10 +1,18 @@ -{ stdenv, fetchurl, glib, flex, bison, pkgconfig, libffi, python, gdk_pixbuf +{ stdenv, fetchurl, glib, flex, bison, pkgconfig, libffi, python , libintlOrEmpty, autoconf, automake, otool }: +# now that gobjectIntrospection creates large .gir files (eg gtk3 case) +# it may be worth thinking about using multiple derivation outputs +# In that case its about 6MB which could be separated stdenv.mkDerivation rec { - name = "gobject-introspection-1.34.2"; + name = "gobject-introspection-1.36.0"; - buildInputs = [ flex bison glib pkgconfig python gdk_pixbuf ] + src = fetchurl { + url = "mirror://gnome/sources/gobject-introspection/1.36/${name}.tar.xz"; + sha256 = "10v3idh489vra7pjn1g8f844nnl6719zgkgq3dv38xcf8afnvrz3"; + }; + + buildInputs = [ flex bison glib pkgconfig python ] ++ libintlOrEmpty ++ stdenv.lib.optional stdenv.isDarwin otool; propagatedBuildInputs = [ libffi ]; @@ -13,13 +21,10 @@ stdenv.mkDerivation rec { # other dependencies). configureFlags = [ "--disable-tests" ]; - src = fetchurl { - url = "mirror://gnome/sources/gobject-introspection/1.34/${name}.tar.xz"; - sha256 = "0a9lq0y67sr3g37l1hy0biqn046jr9wnd05hvwi8j8g2bjilhydw"; - }; - postInstall = "rm -rf $out/share/gtk-doc"; + setupHook = ./setup-hook.sh; + meta = with stdenv.lib; { description = "A middleware layer between C libraries and language bindings"; homepage = http://live.gnome.org/GObjectIntrospection; diff --git a/pkgs/development/libraries/gobject-introspection/setup-hook.sh b/pkgs/development/libraries/gobject-introspection/setup-hook.sh new file mode 100644 index 0000000000000..d411ad69dc43f --- /dev/null +++ b/pkgs/development/libraries/gobject-introspection/setup-hook.sh @@ -0,0 +1,14 @@ +make_gobject_introspection_find_gir_files() { + + # required for .typelib files, eg mypaint git version + if [ -d "$1/lib/girepository-1.0" ]; then + addToSearchPath GI_TYPELIB_PATH $1/lib/girepository-1.0 + fi + + # XDG_DATA_DIRS: required for .gir files? + if [ -d "$1/share" ]; then + addToSearchPath XDG_DATA_DIRS $1/share + fi +} + +envHooks+=(make_gobject_introspection_find_gir_files) diff --git a/pkgs/development/libraries/gtk+/2.x.nix b/pkgs/development/libraries/gtk+/2.x.nix index 6debf2a807b38..92463d80c2bd5 100644 --- a/pkgs/development/libraries/gtk+/2.x.nix +++ b/pkgs/development/libraries/gtk+/2.x.nix @@ -8,19 +8,16 @@ assert xineramaSupport -> xlibs.libXinerama != null; assert cupsSupport -> cups != null; stdenv.mkDerivation rec { - name = "gtk+-2.24.18"; + name = "gtk+-2.24.20"; src = fetchurl { url = "mirror://gnome/sources/gtk+/2.24/${name}.tar.xz"; - sha256 = "1193frzg0qrwa885w77kd055zfpbdjwby88xn2skpx9g4w0k35kc"; + sha256 = "18qdvb7nxi25hfnpmcy01p3majw9jnx83ikm263dk9rrjazvqrnc"; }; enableParallelBuilding = true; - NIX_CFLAGS_COMPILE = "-I${cairo}/include/cairo" - + stdenv.lib.optionalString (libintlOrEmpty != []) " -lintl"; - - buildInputs = stdenv.lib.optional stdenv.isDarwin xlibs.libXi; + NIX_CFLAGS_COMPILE = stdenv.lib.optionalString (libintlOrEmpty != []) "-lintl"; nativeBuildInputs = [ perl pkgconfig gettext ]; diff --git a/pkgs/development/libraries/gtk+/3.x.nix b/pkgs/development/libraries/gtk+/3.x.nix index f89b521758ca2..31bdba716b904 100644 --- a/pkgs/development/libraries/gtk+/3.x.nix +++ b/pkgs/development/libraries/gtk+/3.x.nix @@ -1,5 +1,5 @@ { stdenv, fetchurl, pkgconfig, gettext -, expat, glib, cairo, pango, gdk_pixbuf, atk, at_spi2_atk, xlibs, x11 +, expat, glib, cairo, pango, gdk_pixbuf, atk, at_spi2_atk, xlibs, x11, gobjectIntrospection , xineramaSupport ? stdenv.isLinux , cupsSupport ? stdenv.isLinux, cups ? null }: @@ -17,7 +17,7 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; - nativeBuildInputs = [ pkgconfig gettext ]; + nativeBuildInputs = [ pkgconfig gettext gobjectIntrospection ]; propagatedBuildInputs = with xlibs; with stdenv.lib; [ expat glib cairo pango gdk_pixbuf atk at_spi2_atk ] ++ optionals stdenv.isLinux [ libXrandr libXrender libXcomposite libXi libXcursor ] diff --git a/pkgs/development/libraries/haskell/llvm-general/default.nix b/pkgs/development/libraries/haskell/llvm-general/default.nix new file mode 100644 index 0000000000000..16d9859aae226 --- /dev/null +++ b/pkgs/development/libraries/haskell/llvm-general/default.nix @@ -0,0 +1,21 @@ +{ cabal, HUnit, llvmConfig, mtl, parsec, QuickCheck, setenv +, testFramework, testFrameworkHunit, testFrameworkQuickcheck2, text +, transformers +}: + +cabal.mkDerivation (self: { + pname = "llvm-general"; + version = "3.3.5.0"; + sha256 = "15zrav7339jn6p75g1d7h3qkr1wyal1jzfs8xy73kckw2fzn4nlf"; + buildDepends = [ mtl parsec setenv text transformers ]; + testDepends = [ + HUnit mtl QuickCheck testFramework testFrameworkHunit + testFrameworkQuickcheck2 + ]; + buildTools = [ llvmConfig ]; + meta = { + description = "General purpose LLVM bindings"; + license = self.stdenv.lib.licenses.bsd3; + platforms = self.ghc.meta.platforms; + }; +}) diff --git a/pkgs/development/libraries/lcms2/default.nix b/pkgs/development/libraries/lcms2/default.nix index f3dcc7772e721..774cc7047e8cc 100644 --- a/pkgs/development/libraries/lcms2/default.nix +++ b/pkgs/development/libraries/lcms2/default.nix @@ -1,11 +1,11 @@ {stdenv, fetchurl, libtiff, libjpeg, zlib}: stdenv.mkDerivation rec { - name = "lcms2-2.3"; + name = "lcms2-2.5"; src = fetchurl { url = "mirror://sourceforge/lcms/${name}.tar.gz"; - sha256 = "1r5gmzhginzm90y70dcbamycdfcaz4f7v0bb4nwyaywlvsxpg89y"; + sha256 = "0ax71bmscjzlpmg1r8vj3dypxf2jr7j9qfx5vc8j22j78hmpf9v7"; }; propagatedBuildInputs = [ libtiff libjpeg zlib ]; diff --git a/pkgs/development/libraries/libchamplain/0.6.nix b/pkgs/development/libraries/libchamplain/0.6.nix index c8169b3037c07..79c734dcad62f 100644 --- a/pkgs/development/libraries/libchamplain/0.6.nix +++ b/pkgs/development/libraries/libchamplain/0.6.nix @@ -15,6 +15,8 @@ stdenv.mkDerivation rec { propagatedBuildInputs = [ glib gtk cairo clutter clutter_gtk_0_10 sqlite libsoup ]; + configureFlags = [ "--disable-introspection" ]; # not needed anywhere AFAIK + meta = { homepage = http://projects.gnome.org/libchamplain/; license = "LGPLv2+"; diff --git a/pkgs/development/libraries/libchamplain/default.nix b/pkgs/development/libraries/libchamplain/default.nix index 7f229ad539ea3..263b34701eedb 100644 --- a/pkgs/development/libraries/libchamplain/default.nix +++ b/pkgs/development/libraries/libchamplain/default.nix @@ -13,6 +13,8 @@ stdenv.mkDerivation rec { propagatedBuildInputs = [ glib gtk3 cairo clutter_gtk sqlite libsoup ]; + configureFlags = [ "--disable-introspection" ]; # not needed anywhere AFAIK + meta = { homepage = http://projects.gnome.org/libchamplain/; license = "LGPLv2+"; diff --git a/pkgs/development/libraries/libpng/default.nix b/pkgs/development/libraries/libpng/default.nix index c537ce55cf27c..ec24f1fca970c 100644 --- a/pkgs/development/libraries/libpng/default.nix +++ b/pkgs/development/libraries/libpng/default.nix @@ -1,22 +1,26 @@ -{ stdenv, fetchurl, zlib, apngSupport ? false}: +{ stdenv, fetchurl, zlib, apngSupport ? false }: assert zlib != null; -let whenPatched = stdenv.lib.optionalString apngSupport; - version = "1.6.2"; - patch_src = fetchurl { - url = "mirror://sourceforge/libpng-apng/libpng-${version}-apng.patch.gz"; - sha256 = "0fy7p197ilr9phwqqk9h91s1mc28r6gj0w2ilrw5liagi71z75j1"; - }; +let + version = "1.6.3"; + sha256 = "0i8gz8mbkygc0ny7aa2i2wiavysxy6fdaphl52l49fb3hv9w1v65"; + patch_src = fetchurl { + url = "mirror://sourceforge/libpng-apng/libpng-${version}-apng.patch.gz"; + sha256 = "0fjnb6cgbj2c7ggl0qzcnliml2ylrjxzigp89vw0hxq221k5mlsx"; + }; + whenPatched = stdenv.lib.optionalString apngSupport; -in stdenv.mkDerivation (rec { +in stdenv.mkDerivation rec { name = "libpng" + whenPatched "-apng" + "-${version}"; src = fetchurl { url = "mirror://sourceforge/libpng/libpng-${version}.tar.xz"; - sha256 = "1pljkqjqgyz8c32w8fipd9f0v2gcyhah2ypp0h7ya1r1q85sk5qw"; + inherit sha256; }; + postPatch = whenPatched "gunzip < ${patch_src} | patch -Np1"; + propagatedBuildInputs = [ zlib ]; doCheck = true; @@ -29,10 +33,4 @@ in stdenv.mkDerivation (rec { license = "free-non-copyleft"; # http://www.libpng.org/pub/png/src/libpng-LICENSE.txt platforms = stdenv.lib.platforms.all; }; -} // stdenv.lib.optionalAttrs apngSupport { - - postPatch = '' - gunzip < ${patch_src} | patch -Np1 - ''; - -}) +} diff --git a/pkgs/development/libraries/libwnck/default.nix b/pkgs/development/libraries/libwnck/default.nix index 3c24862214237..d2855afc43ee3 100644 --- a/pkgs/development/libraries/libwnck/default.nix +++ b/pkgs/development/libraries/libwnck/default.nix @@ -9,4 +9,6 @@ stdenv.mkDerivation { }; buildInputs = [ pkgconfig libX11 gtk intltool ]; + + configureFlags = [ "--disable-introspection" ]; # not needed anywhere AFAIK } diff --git a/pkgs/development/libraries/mesa/default.nix b/pkgs/development/libraries/mesa/default.nix index de130d465c2e2..a361f06e4ba9d 100644 --- a/pkgs/development/libraries/mesa/default.nix +++ b/pkgs/development/libraries/mesa/default.nix @@ -3,7 +3,7 @@ , libdrm, xorg, wayland, udev, llvm, libffi , libvdpau , enableTextureFloats ? false # Texture floats are patented, see docs/patents.txt -, enableR600LlvmCompiler ? false # we would need currently unreleased LLVM or patches +, enableR600LlvmCompiler ? false # current llvm-3.3 + mesa-9.1.6 don't configure , enableExtraFeatures ? false # add ~15 MB to mesa_drivers }: @@ -23,7 +23,7 @@ else */ let - version = "9.1.3"; + version = "9.1.6"; driverLink = "/run/opengl-driver" + stdenv.lib.optionalString stdenv.isi686 "-32"; in stdenv.mkDerivation { @@ -31,7 +31,7 @@ stdenv.mkDerivation { src = fetchurl { url = "ftp://ftp.freedesktop.org/pub/mesa/${version}/MesaLib-${version}.tar.bz2"; - sha256="0rnpaambxv5cd6kbfyvv4b8x2rw1xj13a67xbkzmndfh08iaqpcd"; + sha256 = "0gay00fy84hrnp25hpacz5cbvxrpvgg1d390vichmbdgmkqdycp6"; }; prePatch = "patchShebangs ."; @@ -137,7 +137,7 @@ stdenv.mkDerivation { ''; #ToDo: @vcunat isn't sure if drirc will be found when in $out/etc/, but it doesn't seem important ATM - passthru = { inherit libdrm; inherit version; }; + passthru = { inherit libdrm version driverLink; }; meta = { description = "An open source implementation of OpenGL"; diff --git a/pkgs/development/libraries/pango/default.nix b/pkgs/development/libraries/pango/default.nix index 1acb3639f0652..99bf8f10fd82f 100644 --- a/pkgs/development/libraries/pango/default.nix +++ b/pkgs/development/libraries/pango/default.nix @@ -1,17 +1,17 @@ { stdenv, fetchurl, pkgconfig, gettext, x11, glib, cairo, libpng, harfbuzz, fontconfig -, libintlOrEmpty }: +, libintlOrEmpty, gobjectIntrospection }: stdenv.mkDerivation rec { - name = "pango-1.32.5"; #.6 needs a not-yet-stable fontconfig + name = "pango-1.32.5"; #.6 and higher need a not-yet-stable fontconfig (!) src = fetchurl { url = "mirror://gnome/sources/pango/1.32/${name}.tar.xz"; sha256 = "08aqis6j8nd1lb4f2h4h9d9kjvp54iwf8zvqzss0qn4v7nfcjyvx"; }; - NIX_CFLAGS_COMPILE = "-I${cairo}/include/cairo"; + buildInputs = [ gobjectIntrospection ] + ++ stdenv.lib.optionals stdenv.isDarwin [ gettext fontconfig ]; - buildInputs = stdenv.lib.optionals stdenv.isDarwin [ gettext fontconfig ]; nativeBuildInputs = [ pkgconfig ]; diff --git a/pkgs/development/libraries/pangomm/2.28.x.nix b/pkgs/development/libraries/pangomm/2.28.x.nix index d03aa4311fe01..6843ff7a3072d 100644 --- a/pkgs/development/libraries/pangomm/2.28.x.nix +++ b/pkgs/development/libraries/pangomm/2.28.x.nix @@ -11,8 +11,6 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ pkgconfig ]; propagatedBuildInputs = [ pango glibmm cairomm libpng cairo ]; - NIX_CFLAGS_COMPILE = "-I${cairo}/include/cairo"; - meta = with stdenv.lib; { description = "C++ interface to the Pango text rendering library"; homepage = http://www.pango.org/; diff --git a/pkgs/development/libraries/pixman/default.nix b/pkgs/development/libraries/pixman/default.nix index 7fbcedda39564..23bfbeeb80881 100644 --- a/pkgs/development/libraries/pixman/default.nix +++ b/pkgs/development/libraries/pixman/default.nix @@ -1,11 +1,11 @@ { fetchurl, stdenv, pkgconfig, perl, withPNG ? true, libpng, glib /*just passthru*/ }: stdenv.mkDerivation rec { - name = "pixman-0.28.2"; + name = "pixman-0.30.2"; src = fetchurl { url = "http://cairographics.org/releases/${name}.tar.gz"; - sha256 = "0mcvxd5gx3w1wzgph91l2vaiic91jmx7s01hi2igphyvd80ckyia"; + sha256 = "1sgnpx34pj3245a9v8056jddc4cg4xxkqdjvvw6k2hnprhh8k65x"; }; nativeBuildInputs = [ pkgconfig perl ]; diff --git a/pkgs/development/libraries/poppler/default.nix b/pkgs/development/libraries/poppler/default.nix index 55ab0da0cfddf..c5bf80b5ca396 100644 --- a/pkgs/development/libraries/poppler/default.nix +++ b/pkgs/development/libraries/poppler/default.nix @@ -4,8 +4,8 @@ }: let - version = "0.22.4"; # even major numbers are stable - sha256 = "0fz1vk0rbxvnv7ssj8l910k1rx0gjhzl5wr7hkdf4r9jwqs8yhsg"; + version = "0.22.5"; # even major numbers are stable + sha256 = "0678frlr39xvrbva490hk0mqyfnx3bk7i5pma8j6hjmzy68a6hpp"; qtcairo_patches = let qtcairo = fetchgit { # the version for poppler-0.22 diff --git a/pkgs/development/libraries/qt-4.x/4.8/CVE-2013-0254.patch b/pkgs/development/libraries/qt-4.x/4.8/CVE-2013-0254.patch deleted file mode 100644 index 48cc05f1800d4..0000000000000 --- a/pkgs/development/libraries/qt-4.x/4.8/CVE-2013-0254.patch +++ /dev/null @@ -1,66 +0,0 @@ -From 20b26bdb3dd5e46b01b9a7e1ce8342074df3c89c Mon Sep 17 00:00:00 2001 -From: Thiago Macieira <thiago.macieira@intel.com> -Date: Sat, 22 Dec 2012 08:32:12 -0800 -Subject: [PATCH] Change all shmget calls to user-only memory - -Drop the read and write permissions for group and other users in the -system. - -Change-Id: I8fc753f09126651af3fb82df3049050f0b14e876 -(cherry-picked from Qt 5 commit 856f209fb63ae336bfb389a12d2a75fa886dc1c5) -Reviewed-by: Richard J. Moore <rich@kde.org> ---- - src/corelib/kernel/qsharedmemory_unix.cpp | 6 +++--- - src/corelib/kernel/qsystemsemaphore_unix.cpp | 4 ++-- - -diff --git a/src/corelib/kernel/qsharedmemory_unix.cpp b/src/corelib/kernel/qsharedmemory_unix.cpp -index 20d76e3..4cf3acf 100644 ---- a/src/corelib/kernel/qsharedmemory_unix.cpp -+++ b/src/corelib/kernel/qsharedmemory_unix.cpp -@@ -238,7 +238,7 @@ bool QSharedMemoryPrivate::create(int size) - } - - // create -- if (-1 == shmget(unix_key, size, 0666 | IPC_CREAT | IPC_EXCL)) { -+ if (-1 == shmget(unix_key, size, 0600 | IPC_CREAT | IPC_EXCL)) { - QString function = QLatin1String("QSharedMemory::create"); - switch (errno) { - case EINVAL: -@@ -293,7 +293,7 @@ bool QSharedMemoryPrivate::attach(QSharedMemory::AccessMode mode) - { - #ifndef QT_POSIX_IPC - // grab the shared memory segment id -- int id = shmget(unix_key, 0, (mode == QSharedMemory::ReadOnly ? 0444 : 0660)); -+ int id = shmget(unix_key, 0, (mode == QSharedMemory::ReadOnly ? 0400 : 0600)); - if (-1 == id) { - setErrorString(QLatin1String("QSharedMemory::attach (shmget)")); - return false; -@@ -381,7 +381,7 @@ bool QSharedMemoryPrivate::detach() - size = 0; - - // Get the number of current attachments -- int id = shmget(unix_key, 0, 0444); -+ int id = shmget(unix_key, 0, 0400); - cleanHandle(); - - struct shmid_ds shmid_ds; -diff --git a/src/corelib/kernel/qsystemsemaphore_unix.cpp b/src/corelib/kernel/qsystemsemaphore_unix.cpp -index fad9acc..e77456b 100644 ---- a/src/corelib/kernel/qsystemsemaphore_unix.cpp -+++ b/src/corelib/kernel/qsystemsemaphore_unix.cpp -@@ -153,10 +153,10 @@ key_t QSystemSemaphorePrivate::handle(QSystemSemaphore::AccessMode mode) - } - - // Get semaphore -- semaphore = semget(unix_key, 1, 0666 | IPC_CREAT | IPC_EXCL); -+ semaphore = semget(unix_key, 1, 0600 | IPC_CREAT | IPC_EXCL); - if (-1 == semaphore) { - if (errno == EEXIST) -- semaphore = semget(unix_key, 1, 0666 | IPC_CREAT); -+ semaphore = semget(unix_key, 1, 0600 | IPC_CREAT); - if (-1 == semaphore) { - setErrorString(QLatin1String("QSystemSemaphore::handle")); - cleanHandle(); --- -1.7.1 - diff --git a/pkgs/development/libraries/qt-4.x/4.8/default.nix b/pkgs/development/libraries/qt-4.x/4.8/default.nix index 29116d0eb1180..a29dcec2b3943 100644 --- a/pkgs/development/libraries/qt-4.x/4.8/default.nix +++ b/pkgs/development/libraries/qt-4.x/4.8/default.nix @@ -1,7 +1,7 @@ { stdenv, fetchurl, substituteAll , libXrender, libXinerama, libXcursor, libXmu , libXv, libXext , libXfixes, libXrandr, libSM, freetype, fontconfig -, zlib, libjpeg, libpng, libmng, which, mesa, openssl, dbus, cups, pkgconfig +, zlib, libjpeg, libpng, libmng, which, mesa, mesa_glu, openssl, dbus, cups, pkgconfig , libtiff, glib, icu , mysql, postgresql, sqlite , perl, coreutils, libXi @@ -17,18 +17,23 @@ with stdenv.lib; -let v = "4.8.4"; in +let + v_maj = "4.8"; + v_min = "5"; + vers = "${v_maj}.${v_min}"; +in # TODO: # * move some plugins (e.g., SQL plugins) to dedicated derivations to avoid # false build-time dependencies stdenv.mkDerivation rec { - name = "qt-${v}"; + name = "qt-${vers}"; src = fetchurl { - url = "http://releases.qt-project.org/qt4/source/qt-everywhere-opensource-src-${v}.tar.gz"; - sha256 = "0w1j16q6glniv4hppdgcvw52w72gb2jab35ylkw0qjn5lj5y7c1k"; + url = "http://download.qt-project.org/official_releases/qt/" + + "${v_maj}/${vers}/qt-everywhere-opensource-src-${vers}.tar.gz"; + sha256 = "0f51dbgn1dcck8pqimls2qyf1pfmsmyknh767cvw87c3d218ywpb"; }; prePatch = '' @@ -39,11 +44,11 @@ stdenv.mkDerivation rec { patches = [ ./glib-2.32.patch - ./CVE-2013-0254.patch (substituteAll { src = ./dlopen-absolute-paths.diff; inherit cups icu libXfixes; glibc = stdenv.gcc.libc; + openglDriver = mesa.driverLink; }) ] ++ stdenv.lib.optional gtkStyle (substituteAll { src = ./dlopen-gtkstyle.diff; @@ -56,19 +61,23 @@ stdenv.mkDerivation rec { inherit gtk gdk_pixbuf; }); - preConfigure = - '' - export LD_LIBRARY_PATH="`pwd`/lib:$LD_LIBRARY_PATH" - configureFlags+=" - -docdir $out/share/doc/${name} - -plugindir $out/lib/qt4/plugins - -importdir $out/lib/qt4/imports - -examplesdir $out/share/doc/${name}/examples - -demosdir $out/share/doc/${name}/demos - -datadir $out/share/${name} - -translationdir $out/share/${name}/translations - " - ''; + preConfigure = '' + export LD_LIBRARY_PATH="`pwd`/lib:$LD_LIBRARY_PATH" + configureFlags+=" + -docdir $out/share/doc/${name} + -plugindir $out/lib/qt4/plugins + -importdir $out/lib/qt4/imports + -examplesdir $out/share/doc/${name}/examples + -demosdir $out/share/doc/${name}/demos + -datadir $out/share/${name} + -translationdir $out/share/${name}/translations + " + '' + optionalString stdenv.isDarwin '' + export CXX=clang++ + export CC=clang + sed -i 's/QMAKE_CC = gcc/QMAKE_CC = clang/' mkspecs/common/g++-base.conf + sed -i 's/QMAKE_CXX = g++/QMAKE_CXX = clang++/' mkspecs/common/g++-base.conf + ''; prefixKey = "-prefix "; configureFlags = @@ -92,12 +101,11 @@ stdenv.mkDerivation rec { ''; propagatedBuildInputs = - [ libXrender libXrandr libXinerama libXcursor libXext libXfixes - libXv libXi libSM - ] - ++ optional (stdenv.lib.lists.elem stdenv.system stdenv.lib.platforms.mesaPlatforms) mesa + [ libXrender libXrandr libXinerama libXcursor libXext libXfixes libXv libXi + libSM zlib libpng openssl dbus.libs freetype fontconfig glib ] + # Qt doesn't directly need GLU (just GL), but many apps use, it's small and doesn't remain a runtime-dep if not used + ++ optional (stdenv.lib.lists.elem stdenv.system stdenv.lib.platforms.mesaPlatforms) mesa_glu ++ optional ((buildWebkit || buildMultimedia) && stdenv.isLinux ) alsaLib - ++ [ zlib libpng openssl dbus.libs freetype fontconfig glib ] ++ optionals (buildWebkit || buildMultimedia) [ gstreamer gst_plugins_base ]; # The following libraries are only used in plugins @@ -112,6 +120,18 @@ stdenv.mkDerivation rec { # @vcunat has been unable to find a *reliable* fix enableParallelBuilding = false; + NIX_CFLAGS_COMPILE = optionalString stdenv.isDarwin + "-I${glib}/include/glib-2.0 -I${glib}/lib/glib-2.0/include"; + + NIX_LDFLAGS = optionalString stdenv.isDarwin + "-lglib-2.0"; + + preBuild = optionalString stdenv.isDarwin '' + # resolve "extra qualification on member" error + sed -i 's/struct ::TabletProximityRec;/struct TabletProximityRec;/' \ + src/gui/kernel/qt_cocoa_helpers_mac_p.h + ''; + crossAttrs = let isMingw = stdenv.cross.config == "i686-pc-mingw32" || stdenv.cross.config == "x86_64-w64-mingw32"; diff --git a/pkgs/development/libraries/qt-4.x/4.8/dlopen-absolute-paths.diff b/pkgs/development/libraries/qt-4.x/4.8/dlopen-absolute-paths.diff index fe691996277e2..0f5cf2b79c965 100644 --- a/pkgs/development/libraries/qt-4.x/4.8/dlopen-absolute-paths.diff +++ b/pkgs/development/libraries/qt-4.x/4.8/dlopen-absolute-paths.diff @@ -1,7 +1,8 @@ -diff -ru qt-everywhere-opensource-src-4.8.3-orig/src/corelib/tools/qlocale_icu.cpp qt-everywhere-opensource-src-4.8.3/src/corelib/tools/qlocale_icu.cpp ---- qt-everywhere-opensource-src-4.8.3-orig/src/corelib/tools/qlocale_icu.cpp 2012-09-10 21:36:50.000000000 -0400 -+++ qt-everywhere-opensource-src-4.8.3/src/corelib/tools/qlocale_icu.cpp 2012-09-28 22:57:40.764153828 -0400 -@@ -81,7 +81,7 @@ +diff --git a/src/corelib/tools/qlocale_icu.cpp b/src/corelib/tools/qlocale_icu.cpp +index c3e2907..2fac4e1 100644 +--- a/src/corelib/tools/qlocale_icu.cpp ++++ b/src/corelib/tools/qlocale_icu.cpp +@@ -81,7 +81,7 @@ bool qt_initIcu(const QString &localeString) if (status == NotLoaded) { // resolve libicui18n @@ -10,7 +11,7 @@ diff -ru qt-everywhere-opensource-src-4.8.3-orig/src/corelib/tools/qlocale_icu.c lib.setLoadHints(QLibrary::ImprovedSearchHeuristics); if (!lib.load()) { qWarning() << "Unable to load library icui18n" << lib.errorString(); -@@ -111,7 +111,7 @@ +@@ -111,7 +111,7 @@ bool qt_initIcu(const QString &localeString) } // resolve libicuuc @@ -19,10 +20,11 @@ diff -ru qt-everywhere-opensource-src-4.8.3-orig/src/corelib/tools/qlocale_icu.c ucLib.setLoadHints(QLibrary::ImprovedSearchHeuristics); if (!ucLib.load()) { qWarning() << "Unable to load library icuuc" << ucLib.errorString(); -diff -ru qt-everywhere-opensource-src-4.8.3-orig/src/gui/painting/qcups.cpp qt-everywhere-opensource-src-4.8.3/src/gui/painting/qcups.cpp ---- qt-everywhere-opensource-src-4.8.3-orig/src/gui/painting/qcups.cpp 2012-09-10 21:36:51.000000000 -0400 -+++ qt-everywhere-opensource-src-4.8.3/src/gui/painting/qcups.cpp 2012-09-28 18:08:26.600720491 -0400 -@@ -87,7 +87,7 @@ +diff --git a/src/gui/painting/qcups.cpp b/src/gui/painting/qcups.cpp +index 99ea43f..acdf9c9 100644 +--- a/src/gui/painting/qcups.cpp ++++ b/src/gui/painting/qcups.cpp +@@ -87,7 +87,7 @@ static CupsPrintFile _cupsPrintFile = 0; static void resolveCups() { @@ -31,10 +33,11 @@ diff -ru qt-everywhere-opensource-src-4.8.3-orig/src/gui/painting/qcups.cpp qt-e if(cupsLib.load()) { _cupsGetDests = (CupsGetDests) cupsLib.resolve("cupsGetDests"); _cupsFreeDests = (CupsFreeDests) cupsLib.resolve("cupsFreeDests"); -diff -ru qt-everywhere-opensource-src-4.8.3-orig/src/gui/painting/qprinterinfo_unix.cpp qt-everywhere-opensource-src-4.8.3/src/gui/painting/qprinterinfo_unix.cpp ---- qt-everywhere-opensource-src-4.8.3-orig/src/gui/painting/qprinterinfo_unix.cpp 2012-09-10 21:36:51.000000000 -0400 -+++ qt-everywhere-opensource-src-4.8.3/src/gui/painting/qprinterinfo_unix.cpp 2012-09-28 18:08:26.601720488 -0400 -@@ -454,7 +454,7 @@ +diff --git a/src/gui/painting/qprinterinfo_unix.cpp b/src/gui/painting/qprinterinfo_unix.cpp +index 3d15538..f0f5351 100644 +--- a/src/gui/painting/qprinterinfo_unix.cpp ++++ b/src/gui/painting/qprinterinfo_unix.cpp +@@ -454,7 +454,7 @@ int qt_retrieveNisPrinters(QList<QPrinterDescription> *printers) char *domain; int err; @@ -43,22 +46,50 @@ diff -ru qt-everywhere-opensource-src-4.8.3-orig/src/gui/painting/qprinterinfo_u typedef int (*ypGetDefaultDomain)(char **); ypGetDefaultDomain _ypGetDefaultDomain = (ypGetDefaultDomain)lib.resolve("yp_get_default_domain"); typedef int (*ypAll)(const char *, const char *, const struct ypall_callback *); -diff -ru qt-everywhere-opensource-src-4.8.3-orig/src/network/kernel/qhostinfo_unix.cpp qt-everywhere-opensource-src-4.8.3/src/network/kernel/qhostinfo_unix.cpp ---- qt-everywhere-opensource-src-4.8.3-orig/src/network/kernel/qhostinfo_unix.cpp 2012-09-10 21:36:51.000000000 -0400 -+++ qt-everywhere-opensource-src-4.8.3/src/network/kernel/qhostinfo_unix.cpp 2012-09-28 18:08:53.186643755 -0400 -@@ -95,7 +95,7 @@ +diff --git a/src/network/kernel/qhostinfo_unix.cpp b/src/network/kernel/qhostinfo_unix.cpp +index 6b42d1e..f88b628 100644 +--- a/src/network/kernel/qhostinfo_unix.cpp ++++ b/src/network/kernel/qhostinfo_unix.cpp +@@ -95,7 +95,7 @@ static res_state_ptr local_res = 0; static void resolveLibrary() { - #ifndef QT_NO_LIBRARY + #if !defined(QT_NO_LIBRARY) && !defined(Q_OS_QNX) - QLibrary lib(QLatin1String("resolv")); + QLibrary lib(QLatin1String("@glibc@/lib/libresolv")); lib.setLoadHints(QLibrary::ImprovedSearchHeuristics); if (!lib.load()) return; -diff -ru qt-everywhere-opensource-src-4.8.3-orig/src/plugins/platforms/xlib/qxlibstatic.cpp qt-everywhere-opensource-src-4.8.3/src/plugins/platforms/xlib/qxlibstatic.cpp ---- qt-everywhere-opensource-src-4.8.3-orig/src/plugins/platforms/xlib/qxlibstatic.cpp 2012-09-10 21:36:51.000000000 -0400 -+++ qt-everywhere-opensource-src-4.8.3/src/plugins/platforms/xlib/qxlibstatic.cpp 2012-09-28 18:08:26.601720488 -0400 -@@ -242,7 +242,7 @@ +diff --git a/src/plugins/platforms/xcb/qglxintegration.cpp b/src/plugins/platforms/xcb/qglxintegration.cpp +index 229d6f9..c122bf3 100644 +--- a/src/plugins/platforms/xcb/qglxintegration.cpp ++++ b/src/plugins/platforms/xcb/qglxintegration.cpp +@@ -136,7 +136,7 @@ void* QGLXContext::getProcAddress(const QString& procName) + { + extern const QString qt_gl_library_name(); + // QLibrary lib(qt_gl_library_name()); +- QLibrary lib(QLatin1String("GL")); ++ QLibrary lib(QLatin1String("@openglDriver@/lib/libGL")); + glXGetProcAddressARB = (qt_glXGetProcAddressARB) lib.resolve("glXGetProcAddressARB"); + } + } +diff --git a/src/plugins/platforms/xlib/qglxintegration.cpp b/src/plugins/platforms/xlib/qglxintegration.cpp +index 2467247..a2441d4 100644 +--- a/src/plugins/platforms/xlib/qglxintegration.cpp ++++ b/src/plugins/platforms/xlib/qglxintegration.cpp +@@ -137,7 +137,7 @@ void* QGLXContext::getProcAddress(const QString& procName) + { + extern const QString qt_gl_library_name(); + // QLibrary lib(qt_gl_library_name()); +- QLibrary lib(QLatin1String("GL")); ++ QLibrary lib(QLatin1String("@openglDriver@/lib/libGL")); + glXGetProcAddressARB = (qt_glXGetProcAddressARB) lib.resolve("glXGetProcAddressARB"); + } + } +diff --git a/src/plugins/platforms/xlib/qxlibstatic.cpp b/src/plugins/platforms/xlib/qxlibstatic.cpp +index f8f3d69..d63c5bc 100644 +--- a/src/plugins/platforms/xlib/qxlibstatic.cpp ++++ b/src/plugins/platforms/xlib/qxlibstatic.cpp +@@ -242,7 +242,7 @@ static void* qt_load_library_runtime(const char *library, int vernum, } # define XFIXES_LOAD_RUNTIME(vernum, symbol, symbol_type) \ diff --git a/pkgs/development/libraries/wxGTK-2.8/default.nix b/pkgs/development/libraries/wxGTK-2.8/default.nix index e11de87415d0a..62d2de0238f18 100644 --- a/pkgs/development/libraries/wxGTK-2.8/default.nix +++ b/pkgs/development/libraries/wxGTK-2.8/default.nix @@ -28,6 +28,7 @@ stdenv.mkDerivation rec { "--disable-precomp-headers" (if unicode then "--enable-unicode" else "") "--enable-mediactrl" + "--enable-graphics_ctx" ] ++ optional withMesa "--with-opengl"; # These variables are used by configure to find some dependencies. |