From a126ce011af5292f44c60f0a55423cec3917570c Mon Sep 17 00:00:00 2001 From: Vladimír Čunát Date: Sat, 28 Dec 2013 15:34:08 +0100 Subject: gnumeric: add schemas and icons, refactor Also move goffice under gnome3, as it's released in the same way. --- pkgs/applications/office/gnumeric/default.nix | 17 +++++--- pkgs/desktops/gnome-3/default.nix | 21 +++++++--- pkgs/desktops/gnome-3/misc/goffice/0.8.nix | 37 +++++++++++++++++ pkgs/desktops/gnome-3/misc/goffice/default.nix | 33 +++++++++++++++ pkgs/desktops/gnome-3/misc/goffice/pcre_info.patch | 13 ++++++ pkgs/development/libraries/goffice/0.10.nix | 37 ----------------- pkgs/development/libraries/goffice/default.nix | 48 ---------------------- pkgs/development/libraries/goffice/pcre_info.patch | 13 ------ pkgs/top-level/all-packages.nix | 23 ++++------- 9 files changed, 117 insertions(+), 125 deletions(-) create mode 100644 pkgs/desktops/gnome-3/misc/goffice/0.8.nix create mode 100644 pkgs/desktops/gnome-3/misc/goffice/default.nix create mode 100644 pkgs/desktops/gnome-3/misc/goffice/pcre_info.patch delete mode 100644 pkgs/development/libraries/goffice/0.10.nix delete mode 100644 pkgs/development/libraries/goffice/default.nix delete mode 100644 pkgs/development/libraries/goffice/pcre_info.patch (limited to 'pkgs') diff --git a/pkgs/applications/office/gnumeric/default.nix b/pkgs/applications/office/gnumeric/default.nix index f4389716b76..10b486a438f 100644 --- a/pkgs/applications/office/gnumeric/default.nix +++ b/pkgs/applications/office/gnumeric/default.nix @@ -1,6 +1,5 @@ -{ stdenv, fetchurl -, bzip2, glib, goffice, gtk3, intltool, libglade, libgsf, libxml2 -, pango, pkgconfig, scrollkeeper, zlib +{ stdenv, fetchurl, pkgconfig, intltool, perl, perlXMLParser +, goffice, makeWrapper, gtk3, gnome_icon_theme }: stdenv.mkDerivation rec { @@ -11,13 +10,21 @@ stdenv.mkDerivation rec { sha256 = "1rv2ifw6rp0iza4fkf3bffvdkyi77dwvzdnvcbpqcyn2kxfsvlsc"; }; + preConfigure = ''sed -i 's/\(SUBDIRS.*\) doc/\1/' Makefile.in''; # fails when installing docs + configureFlags = "--disable-component"; + # ToDo: optional libgda, python, introspection? buildInputs = [ - bzip2 glib goffice gtk3 intltool libglade libgsf libxml2 - pango pkgconfig scrollkeeper zlib + pkgconfig intltool perl perlXMLParser + goffice gtk3 makeWrapper ]; + postInstall = '' + wrapProgram "$out"/bin/gnumeric-* \ + --prefix XDG_DATA_DIRS : "${gtk3}/share:${gnome_icon_theme}/share" + ''; + meta = { description = "The GNOME Office Spreadsheet"; license = "GPLv2+"; diff --git a/pkgs/desktops/gnome-3/default.nix b/pkgs/desktops/gnome-3/default.nix index d3e575a7d27..d214a44aa0a 100644 --- a/pkgs/desktops/gnome-3/default.nix +++ b/pkgs/desktops/gnome-3/default.nix @@ -1,14 +1,16 @@ -{ callPackage, lib, self, stdenv, gettext, overrides ? {}, pkgs }: +{ callPackage, self, pkgs }: rec { - inherit (pkgs) fetchurl_gnome glib gtk3 atk pango; - gtk = gtk3; + inherit (pkgs) glib gtk2 gtk3 gnome2; + gtk = gtk3; # just to be sure inherit (pkgs.gnome2) gnome_common ORBit2; orbit = ORBit2; - inherit (lib) lowPrio hiPrio appendToName makeOverridable; - __overrides = overrides; +#### Overrides of libraries + + librsvg = pkgs.librsvg.override { inherit gtk2; }; # gtk2 mysteriously needed in librsvg for goffice (commented in Gentoo) + #### Core (http://ftp.acc.umu.se/pub/GNOME/core/) @@ -31,7 +33,7 @@ rec { gnome_terminal = callPackage ./core/gnome-terminal { }; - gsettings_desktop_schemas = lib.lowPrio (callPackage ./core/gsettings-desktop-schemas { }); + gsettings_desktop_schemas = callPackage ./core/gsettings-desktop-schemas { }; gvfs = pkgs.gvfs.override { gnome = pkgs.gnome3; }; @@ -43,16 +45,23 @@ rec { zenity = callPackage ./core/zenity { }; + #### Apps (http://ftp.acc.umu.se/pub/GNOME/apps/) gnome_dictionary = callPackage ./desktop/gnome-dictionary { }; gnome_desktop = callPackage ./desktop/gnome-desktop { }; + # Removed from recent GNOME releases, but still required scrollkeeper = callPackage ./desktop/scrollkeeper { }; # scrollkeeper replacement rarian = callPackage ./desktop/rarian { }; + +#### Misc -- other packages on http://ftp.gnome.org/pub/GNOME/sources/ + + goffice = callPackage ./misc/goffice { }; + } diff --git a/pkgs/desktops/gnome-3/misc/goffice/0.8.nix b/pkgs/desktops/gnome-3/misc/goffice/0.8.nix new file mode 100644 index 00000000000..02520a9f121 --- /dev/null +++ b/pkgs/desktops/gnome-3/misc/goffice/0.8.nix @@ -0,0 +1,37 @@ +{ fetchurl, stdenv, pkgconfig, glib, gtk, libglade, bzip2 +, pango, libgsf, libxml2, libart, intltool, gettext +, cairo, gconf, libgnomeui, pcre, gnome3/*just meta*/ }: + +stdenv.mkDerivation rec { + name = "goffice-0.8.17"; + + src = fetchurl { + url = "mirror://gnome/sources/goffice/0.8/${name}.tar.xz"; + sha256 = "165070beb67b84580afe80a8a100b674a81d553ab791acd72ac0c655f4fadb15"; + }; + + # fix linking error: undefined reference to pcre_info + patches = [ ./pcre_info.patch ]; # inspired by https://bugs.php.net/bug.php?id=60986 + + buildInputs = [ + pkgconfig libglade bzip2 libart intltool gettext + gconf libgnomeui pcre + ]; + + propagatedBuildInputs = [ + # All these are in the "Requires:" field of `libgoffice-0.6.pc'. + glib libgsf libxml2 gtk libglade libart cairo pango + ]; + + postInstall = + '' + # Get GnuCash to build. Might be unnecessary if we upgrade pkgconfig. + substituteInPlace $out/lib/pkgconfig/libgoffice-*.pc --replace Requires.private Requires + ''; + + doCheck = true; + + meta = gnome3.goffice.meta // { + maintainers = [ ]; + }; +} diff --git a/pkgs/desktops/gnome-3/misc/goffice/default.nix b/pkgs/desktops/gnome-3/misc/goffice/default.nix new file mode 100644 index 00000000000..d708ab92113 --- /dev/null +++ b/pkgs/desktops/gnome-3/misc/goffice/default.nix @@ -0,0 +1,33 @@ +{ fetchurl, stdenv, pkgconfig, intltool, bzip2, glib, gdk_pixbuf, gtk3 +, libgsf, libxml2, cairo, pango, librsvg, libspectre }: + +stdenv.mkDerivation rec { + name = "goffice-0.10.9"; + + src = fetchurl { + url = "mirror://gnome/sources/goffice/0.10/${name}.tar.xz"; + sha256 = "0xc82hymhkdglnksd3r7405p39d5ym826rwaa7dfkps5crjwq8cg"; + }; + + propagatedBuildInputs = [ # ToDo lasem library for MathML, opt. introspection? + pkgconfig intltool bzip2 glib gdk_pixbuf gtk3 + libgsf libxml2 cairo pango librsvg libspectre + ]; + + doCheck = true; + + meta = { + description = "A Glib/GTK+ set of document centric objects and utilities"; + + longDescription = '' + There are common operations for document centric applications that are + conceptually simple, but complex to implement fully: plugins, load/save + documents, undo/redo. + ''; + + license = "GPLv2+"; + + platforms = stdenv.lib.platforms.gnu; + }; + passthru = { inherit meta; }; +} diff --git a/pkgs/desktops/gnome-3/misc/goffice/pcre_info.patch b/pkgs/desktops/gnome-3/misc/goffice/pcre_info.patch new file mode 100644 index 00000000000..cd4ef3c9fed --- /dev/null +++ b/pkgs/desktops/gnome-3/misc/goffice/pcre_info.patch @@ -0,0 +1,13 @@ +diff --git a/goffice/utils/regutf8.c b/goffice/utils/regutf8.c +index bc4aae4..3adb696 100644 +--- a/goffice/utils/regutf8.c ++++ b/goffice/utils/regutf8.c +@@ -155,7 +155,7 @@ go_regcomp (GORegexp *gor, const char *pat, int cflags) + default: return GO_REG_BADPAT; + } + } else { +- gor->re_nsub = pcre_info (r, NULL, NULL); ++ gor->re_nsub = pcre_fullinfo (r, NULL, NULL, NULL); + gor->nosub = (cflags & GO_REG_NOSUB) != 0; + return 0; + } diff --git a/pkgs/development/libraries/goffice/0.10.nix b/pkgs/development/libraries/goffice/0.10.nix deleted file mode 100644 index 20414952834..00000000000 --- a/pkgs/development/libraries/goffice/0.10.nix +++ /dev/null @@ -1,37 +0,0 @@ -{ fetchurl, stdenv, pkgconfig, glib, gtk, libglade, bzip2 -, pango, libgsf, libxml2, libart, librsvg, intltool, gettext -, cairo, gconf, libgnomeui }: - -stdenv.mkDerivation rec { - name = "goffice-0.10.9"; - - src = fetchurl { - url = "mirror://gnome/sources/goffice/0.10/${name}.tar.xz"; - sha256 = "0xc82hymhkdglnksd3r7405p39d5ym826rwaa7dfkps5crjwq8cg"; - }; - - buildInputs = [ - pkgconfig libglade bzip2 libart intltool gettext - gconf libgnomeui - ]; - - propagatedBuildInputs = [ - glib libgsf libxml2 gtk libglade libart librsvg cairo pango - ]; - - doCheck = true; - - meta = { - description = "GOffice, a Glib/GTK+ set of document centric objects and utilities"; - - longDescription = '' - There are common operations for document centric applications that are - conceptually simple, but complex to implement fully: plugins, load/save - documents, undo/redo. - ''; - - license = "GPLv2+"; - - platforms = stdenv.lib.platforms.gnu; - }; -} diff --git a/pkgs/development/libraries/goffice/default.nix b/pkgs/development/libraries/goffice/default.nix deleted file mode 100644 index 016b340c51f..00000000000 --- a/pkgs/development/libraries/goffice/default.nix +++ /dev/null @@ -1,48 +0,0 @@ -{ fetchurl, stdenv, pkgconfig, glib, gtk, libglade, bzip2 -, pango, libgsf, libxml2, libart, intltool, gettext -, cairo, gconf, libgnomeui, pcre }: - -stdenv.mkDerivation rec { - name = "goffice-0.8.17"; - - src = fetchurl { - url = "mirror://gnome/sources/goffice/0.8/${name}.tar.xz"; - sha256 = "165070beb67b84580afe80a8a100b674a81d553ab791acd72ac0c655f4fadb15"; - }; - - # fix linking error: undefined reference to pcre_info - patches = [ ./pcre_info.patch ]; # inspired by https://bugs.php.net/bug.php?id=60986 - - buildInputs = [ - pkgconfig libglade bzip2 libart intltool gettext - gconf libgnomeui pcre - ]; - - propagatedBuildInputs = [ - # All these are in the "Requires:" field of `libgoffice-0.6.pc'. - glib libgsf libxml2 gtk libglade libart cairo pango - ]; - - postInstall = - '' - # Get GnuCash to build. Might be unnecessary if we upgrade pkgconfig. - substituteInPlace $out/lib/pkgconfig/libgoffice-*.pc --replace Requires.private Requires - ''; - - doCheck = true; - - meta = { - description = "GOffice, a Glib/GTK+ set of document centric objects and utilities"; - - longDescription = '' - There are common operations for document centric applications that are - conceptually simple, but complex to implement fully: plugins, load/save - documents, undo/redo. - ''; - - license = "GPLv2"; - - maintainers = [ ]; - platforms = stdenv.lib.platforms.gnu; - }; -} diff --git a/pkgs/development/libraries/goffice/pcre_info.patch b/pkgs/development/libraries/goffice/pcre_info.patch deleted file mode 100644 index cd4ef3c9fed..00000000000 --- a/pkgs/development/libraries/goffice/pcre_info.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/goffice/utils/regutf8.c b/goffice/utils/regutf8.c -index bc4aae4..3adb696 100644 ---- a/goffice/utils/regutf8.c -+++ b/goffice/utils/regutf8.c -@@ -155,7 +155,7 @@ go_regcomp (GORegexp *gor, const char *pat, int cflags) - default: return GO_REG_BADPAT; - } - } else { -- gor->re_nsub = pcre_info (r, NULL, NULL); -+ gor->re_nsub = pcre_fullinfo (r, NULL, NULL, NULL); - gor->nosub = (cflags & GO_REG_NOSUB) != 0; - return 0; - } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 39eb66d5435..cf9d64a1f0b 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -4361,19 +4361,6 @@ let gobjectIntrospection = callPackage ../development/libraries/gobject-introspection { }; - goffice = callPackage ../development/libraries/goffice { - inherit (gnome) libglade libgnomeui; - gconf = gnome.GConf; - libart = gnome.libart_lgpl; - }; - - goffice_0_10 = callPackage ../development/libraries/goffice/0.10.nix { - inherit (gnome) libglade libgnomeui; - gconf = gnome.GConf; - libart = gnome.libart_lgpl; - gtk = gtk3; - }; - goocanvas = callPackage ../development/libraries/goocanvas { }; gperftools = callPackage ../development/libraries/gperftools { }; @@ -7877,7 +7864,6 @@ let inherit (gnome3) evince; keepass = callPackage ../applications/misc/keepass { }; - evolution_data_server = newScope (gnome) ../servers/evolution-data-server { }; exrdisplay = callPackage ../applications/graphics/exrdisplay { @@ -8056,7 +8042,13 @@ let gconf = gnome2.GConf; guile = guile_1_8; slibGuile = slibGuile.override { scheme = guile_1_8; }; + goffice = goffice_0_8; }; + goffice_0_8 = callPackage ../desktops/gnome-3/misc/goffice/0.8.nix { + inherit (gnome2) libglade libgnomeui; + gconf = gnome2.GConf; + libart = gnome2.libart_lgpl; + }; # latest version: gnome3.goffice ideas = recurseIntoAttrs (callPackage ../applications/editors/idea { }); @@ -8086,8 +8078,7 @@ let }; gnumeric = callPackage ../applications/office/gnumeric { - goffice = goffice_0_10; - inherit (gnome) libglade scrollkeeper; + inherit (gnome3) goffice gnome_icon_theme; }; gnunet = callPackage ../applications/networking/p2p/gnunet { }; -- cgit 1.4.1