[Nix-dev] [PATCH] gimp git snapshot. New time saving feature: layer groups. gimp git requires newer gtk - adding now global dict.
Marc Weber
marco-oweber at gmx.de
Fri Jul 9 22:32:16 CEST 2010
---
pkgs/applications/graphics/gimp/default.nix | 58 +++++++++++++++-----
.../applications/graphics/gimp/plugins/default.nix | 2 +-
pkgs/development/libraries/atk/1.30.x.nix | 33 +++++++++++
pkgs/development/libraries/babl/default.nix | 6 +-
pkgs/development/libraries/gegl/default.nix | 6 +-
pkgs/development/libraries/glib/2.24.x.nix | 37 +++++++++++++
pkgs/development/libraries/gtk+/2.21.x.nix | 49 +++++++++++++++++
pkgs/development/python-modules/pygtk/default.nix | 3 +-
pkgs/top-level/all-packages.nix | 53 +++++++++++++++---
9 files changed, 216 insertions(+), 31 deletions(-)
create mode 100644 pkgs/development/libraries/atk/1.30.x.nix
create mode 100644 pkgs/development/libraries/glib/2.24.x.nix
create mode 100644 pkgs/development/libraries/gtk+/2.21.x.nix
diff --git a/pkgs/applications/graphics/gimp/default.nix b/pkgs/applications/graphics/gimp/default.nix
index 8c8e1c9..f37a536 100644
--- a/pkgs/applications/graphics/gimp/default.nix
+++ b/pkgs/applications/graphics/gimp/default.nix
@@ -1,28 +1,58 @@
-{ stdenv, fetchurl, pkgconfig, gtk, freetype
-, fontconfig, libart_lgpl, libtiff, libjpeg, libpng, libexif, zlib, perl
-, perlXMLParser, python, pygtk, gettext, xlibs, intltool, babl, gegl
+{ pkgs, pkgsNewerGlib
+, version ? "2.6.9"
}:
+let
+
+ p = if version == "git" then pkgsNewerGlib else pkgs;
+
+ inherit (p) stdenv fetchurl sourceFromHead;
+
+in
+
stdenv.mkDerivation rec {
- name = "gimp-2.6.9";
+ name = "gimp-${version}";
- src = fetchurl {
- url = "ftp://ftp.gtk.org/pub/gimp/v2.6/${name}.tar.bz2";
- sha256 = "1w7qp38d8qrd36jgxlk4dg4npxir958kx6sq6qw85pv0016kvd1v";
- };
+ src =
+ if version == "2.6.9" then
+ fetchurl {
+ url = "ftp://ftp.gtk.org/pub/gimp/v2.6/${name}.tar.bz2";
+ sha256 = "1w7qp38d8qrd36jgxlk4dg4npxir958kx6sq6qw85pv0016kvd1v";
+ }
+ else if version == "2.7.0" then
+ fetchurl {
+ url = "ftp://ftp.gimp.org/pub/gimp/v2.7/${name}.tar.bz2";
+ md5 = "bd9fb22079a547f1f302c219b1a29fcc";
+ }
+ else if version == "git" then
+ {
+ # REGION AUTO UPDATE: { name="gimp"; type="git"; url="git://git.gnome.org/gimp"; groups = "gimp"; }
+ src = sourceFromHead "gimp-706900c4f6e9d669b7c8be2065decf49a9898620.tar.gz"
+ (fetchurl { url = "http://mawercer.de/~nix/repos/gimp-706900c4f6e9d669b7c8be2065decf49a9898620.tar.gz"; sha256 = "0579312d484b2fc827de56cfd4e1ef7c55d7c6d3752af70fc293d37da7a96e86"; });
+ # END
+ }.src
+ else throw "no source available";
+
+ preConfigure = if version == "git" then ''
+ ./autogen.sh
+ '' else "";
buildInputs = [
- pkgconfig gtk freetype fontconfig
- libart_lgpl libtiff libjpeg libpng libexif zlib perl
- perlXMLParser python pygtk gettext intltool babl gegl
- ];
+ p.pkgconfig p.gtkLibs.gtk p.freetype p.fontconfig
+ p.gnome.libart_lgpl p.libtiff p.libjpeg p.libpng p.libexif p.zlib p.perl
+ p.perlXMLParser p.python p.pygtk p.gettext p.intltool p.babl p.gegl
+ ]
+ ++ stdenv.lib.optionals (version == "git") [
+ p.autoconf p.automake p.gnome.gtkdoc
+ p.libxslt p.libtool ]
+ ;
- passthru = { inherit gtk; }; # probably its a good idea to use the same gtk in plugins ?
+ passthru = { inherit (p) gtkLibs; inherit (p.gtkLibs) gtk; }; # used by gimp plugins
configureFlags = [ "--disable-print" ];
# "screenshot" needs this.
- NIX_LDFLAGS = "-rpath ${xlibs.libX11}/lib";
+ NIX_LDFLAGS = "-rpath ${p.xlibs.libX11}/lib";
meta = {
description = "The GNU Image Manipulation Program";
diff --git a/pkgs/applications/graphics/gimp/plugins/default.nix b/pkgs/applications/graphics/gimp/plugins/default.nix
index f988ddf..8cdda52 100644
--- a/pkgs/applications/graphics/gimp/plugins/default.nix
+++ b/pkgs/applications/graphics/gimp/plugins/default.nix
@@ -75,7 +75,7 @@ rec {
Filters/Generic/FFT Inverse
*/
name = "fourier-0.3.3";
- buildInputs = [ gimp pkgs.fftwSinglePrec pkgconfig glib] ++ gimp.buildNativeInputs;
+ buildInputs = [ gimp pkgs.fftwSinglePrec pkgconfig gimp.gtkLibs.glib] ++ gimp.buildNativeInputs;
postInstall = "fail";
installPhase = "installPlugins fourier";
src = fetchurl {
diff --git a/pkgs/development/libraries/atk/1.30.x.nix b/pkgs/development/libraries/atk/1.30.x.nix
new file mode 100644
index 0000000..e46a6ee
--- /dev/null
+++ b/pkgs/development/libraries/atk/1.30.x.nix
@@ -0,0 +1,33 @@
+{ stdenv, fetchurl, pkgconfig, perl, glib }:
+
+stdenv.mkDerivation rec {
+ name = "atk-1.30.0";
+
+ src = fetchurl {
+ url = "mirror://gnome/sources/atk/1.30/${name}.tar.bz2";
+ sha256 = "1316ih5jgi9xv0fn67vvglij6r62d2wp6ql0qglqzimg7hhv3fcj";
+ };
+
+ buildInputs = [pkgconfig perl];
+ propagatedBuildInputs = [glib];
+
+ meta = {
+ description = "ATK, the accessibility toolkit";
+
+ longDescription = ''
+ ATK is the Accessibility Toolkit. It provides a set of generic
+ interfaces allowing accessibility technologies such as screen
+ readers to interact with a graphical user interface. Using the
+ ATK interfaces, accessibility tools have full access to view and
+ control running applications.
+ '';
+
+ homepage = http://library.gnome.org/devel/atk/;
+
+ license = "LGPLv2+";
+
+ maintainers = [stdenv.lib.maintainers.raskin];
+ platforms = stdenv.lib.platforms.linux;
+ };
+
+}
diff --git a/pkgs/development/libraries/babl/default.nix b/pkgs/development/libraries/babl/default.nix
index d00e3f6..30198af 100644
--- a/pkgs/development/libraries/babl/default.nix
+++ b/pkgs/development/libraries/babl/default.nix
@@ -1,10 +1,10 @@
args:
args.stdenv.mkDerivation {
- name = "babl-0.0.22";
+ name = "babl-0.1.2";
src = args.fetchurl {
- url = ftp://ftp.gtk.org/pub/babl/0.0/babl-0.0.22.tar.bz2;
- sha256 = "0v8gbf9si4sd06199f8lfmrsbvi6i0hxphd34kyvsj6g2kkkg10s";
+ url = ftp://ftp.gtk.org/pub/babl/0.1/babl-0.1.2.tar.bz2;
+ sha256 = "1de1394f3d49313bd99f2eab5ae7a4ddfd66d27cdaa89aede67b0dd96f43b722";
};
buildInputs =(with args; []);
diff --git a/pkgs/development/libraries/gegl/default.nix b/pkgs/development/libraries/gegl/default.nix
index 5089316..87cc279 100644
--- a/pkgs/development/libraries/gegl/default.nix
+++ b/pkgs/development/libraries/gegl/default.nix
@@ -1,10 +1,10 @@
args:
args.stdenv.mkDerivation {
- name = "gegl-0.0.22";
+ name = "gegl-0.1.2";
src = args.fetchurl {
- url = ftp://ftp.gimp.org/pub/gegl/0.0/gegl-0.0.22.tar.bz2;
- sha256 = "0nx6r9amzhw5d2ghlw3z8qnry18rwz1ymvl2cm31b8p49z436wl5";
+ url = ftp://ftp.gimp.org/pub/gegl/0.1/gegl-0.1.2.tar.bz2;
+ sha256 = "04z130hwl09jq06a602a7j70c8mppk81kclncms4lkqc8sdn2kmn";
};
configureFlags = "--disable-docs"; # needs fonts otherwise don't know how to pass them
diff --git a/pkgs/development/libraries/glib/2.24.x.nix b/pkgs/development/libraries/glib/2.24.x.nix
new file mode 100644
index 0000000..c31b8f1
--- /dev/null
+++ b/pkgs/development/libraries/glib/2.24.x.nix
@@ -0,0 +1,37 @@
+{ stdenv, fetchurl, pkgconfig, gettext, perl, zlib, libiconv ? null}:
+
+stdenv.mkDerivation rec {
+ name = "glib-2.24.1";
+
+ src = fetchurl {
+ url = "mirror://gnome/sources/glib/2.24/${name}.tar.bz2";
+ sha256 = "013dxb91b3v5xb75224rvc0nbwq5bx4icp07f5ri25xzc2lksk01";
+ };
+
+ buildInputs = [pkgconfig gettext perl libiconv];
+
+ propagatedBuildInputs = [zlib];
+
+ # The nbd package depends on a static version of this library; hence
+ # the default configure flag --disable-static is switched off.
+ dontDisableStatic = true;
+ configureFlags = "--enable-static --enable-shared";
+
+ meta = {
+ description = "GLib, a C library of programming buildings blocks";
+
+ longDescription = ''
+ GLib provides the core application building blocks for libraries
+ and applications written in C. It provides the core object
+ system used in GNOME, the main loop implementation, and a large
+ set of utility functions for strings and common data structures.
+ '';
+
+ homepage = http://www.gtk.org/;
+
+ license = "LGPLv2+";
+
+ maintainers = [stdenv.lib.maintainers.raskin];
+ platforms = stdenv.lib.platforms.linux;
+ };
+}
diff --git a/pkgs/development/libraries/gtk+/2.21.x.nix b/pkgs/development/libraries/gtk+/2.21.x.nix
new file mode 100644
index 0000000..d0151a7
--- /dev/null
+++ b/pkgs/development/libraries/gtk+/2.21.x.nix
@@ -0,0 +1,49 @@
+{ stdenv, fetchurl, pkgconfig, glib, atk, pango, libtiff, libjpeg
+, libpng, cairo, perl, jasper, xlibs
+, xineramaSupport ? true
+, cupsSupport ? true, cups ? null
+}:
+
+assert xineramaSupport -> xlibs.libXinerama != null;
+assert cupsSupport -> cups != null;
+
+stdenv.mkDerivation rec {
+ name = "gtk+-2.21.1";
+
+ src = fetchurl {
+ url = "mirror://gnome/sources/gtk+/2.21/${name}.tar.bz2";
+ sha256 = "1mvdjib29rga6f1j2ci076iqiaxmhd91mrd8v773yz0ahaxinqpm";
+ };
+
+ buildNativeInputs = [ perl ];
+ buildInputs = [ pkgconfig jasper ];
+
+ propagatedBuildInputs =
+ [ xlibs.xlibs glib atk pango libtiff libjpeg libpng cairo xlibs.libXrandr ]
+ ++ stdenv.lib.optional xineramaSupport xlibs.libXinerama
+ ++ stdenv.lib.optionals cupsSupport [ cups ];
+
+ passthru = { inherit libtiff libjpeg libpng; };
+
+ meta = {
+ description = "A multi-platform toolkit for creating graphical user interfaces";
+
+ longDescription = ''
+ GTK+ is a highly usable, feature rich toolkit for creating
+ graphical user interfaces which boasts cross platform
+ compatibility and an easy to use API. GTK+ it is written in C,
+ but has bindings to many other popular programming languages
+ such as C++, Python and C# among others. GTK+ is licensed
+ under the GNU LGPL 2.1 allowing development of both free and
+ proprietary software with GTK+ without any license fees or
+ royalties.
+ '';
+
+ homepage = http://www.gtk.org/;
+
+ license = "LGPLv2+";
+
+ maintainers = [stdenv.lib.maintainers.raskin];
+ platforms = stdenv.lib.platforms.linux;
+ };
+}
diff --git a/pkgs/development/python-modules/pygtk/default.nix b/pkgs/development/python-modules/pygtk/default.nix
index 3dc37eb..ac893f1 100644
--- a/pkgs/development/python-modules/pygtk/default.nix
+++ b/pkgs/development/python-modules/pygtk/default.nix
@@ -1,5 +1,6 @@
{stdenv, fetchurl, python, pkgconfig, glib, gtk, pygobject, pycairo
- , libglade ? null}:
+ , libglade ? null
+ , ...}:
stdenv.mkDerivation {
name = "pygtk-2.16.0";
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index b200317..4081e46 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -3942,7 +3942,7 @@ let
inherit (gtkLibs1x) gtk;
};
- gegl = import ../development/libraries/gegl {
+ gegl = makeOverridable (import ../development/libraries/gegl) {
inherit fetchurl stdenv libpng pkgconfig babl;
openexr = openexr_1_6_1;
# avocodec avformat librsvg
@@ -4282,6 +4282,41 @@ let
};
+
+ gtkLibs221 = rec {
+
+ glib = import ../development/libraries/glib/2.24.x.nix {
+ inherit fetchurl stdenv pkgconfig gettext perl zlib;
+ libiconv = if (stdenv.system == "i686-freebsd") then libiconv else null;
+ };
+
+ glibmm = import ../development/libraries/glibmm/2.22.x.nix {
+ inherit fetchurl stdenv pkgconfig glib libsigcxx;
+ };
+
+ atk = import ../development/libraries/atk/1.30.x.nix {
+ inherit fetchurl stdenv pkgconfig perl glib;
+ };
+
+ pango = import ../development/libraries/pango/1.26.x.nix {
+ inherit fetchurl stdenv pkgconfig gettext x11 glib cairo libpng;
+ };
+
+ pangomm = import ../development/libraries/pangomm/2.26.x.nix {
+ inherit fetchurl stdenv pkgconfig pango glibmm cairomm libpng;
+ };
+
+ gtk = import ../development/libraries/gtk+/2.21.x.nix {
+ inherit fetchurl stdenv pkgconfig perl jasper glib atk pango
+ libtiff libjpeg libpng cairo xlibs cups;
+ };
+
+ gtkmm = import ../development/libraries/gtkmm/2.18.x.nix {
+ inherit fetchurl stdenv pkgconfig gtk atk glibmm cairomm pangomm;
+ };
+
+ };
+
gtkmozembedsharp = import ../development/libraries/gtkmozembed-sharp {
inherit fetchurl stdenv mono pkgconfig monoDLLFixer;
inherit (gnome) gtk;
@@ -5772,7 +5807,7 @@ let
inherit fetchurl stdenv python pkgconfig glib;
};
- pygtk = import ../development/python-modules/pygtk {
+ pygtk = makeOverridable (import ../development/python-modules/pygtk) {
inherit fetchurl stdenv python pkgconfig pygobject pycairo;
inherit (gtkLibs) glib gtk;
};
@@ -7998,16 +8033,16 @@ let
gtksharp = gtksharp1;
};
- gimp = import ../applications/graphics/gimp {
- inherit fetchurl stdenv pkgconfig freetype fontconfig
- libtiff libjpeg libpng libexif zlib perl perlXMLParser
- python pygtk gettext xlibs intltool babl gegl;
- inherit (gnome) gtk libart_lgpl;
+ gimp = makeOverridable (import ../applications/graphics/gimp) {
+ inherit pkgs;
+ pkgsNewerGlib = pkgsFunDeepOverride { gtkLibs = gtkLibs221; };
};
+ gimpSnapshot = gimp.override { version = "2.7.0"; };
+ gimpGit = gimp.override { version = "git"; };
- gimpPlugins = recurseIntoAttrs (import ../applications/graphics/gimp/plugins {
+ gimpPlugins = makeOverridable (import ../applications/graphics/gimp/plugins) {
inherit pkgs gimp;
- });
+ };
gitAndTools = recurseIntoAttrs (import ../applications/version-management/git-and-tools {
inherit pkgs;
--
1.7.1
More information about the nix-dev
mailing list