1{
2 lib,
3 stdenv,
4 fetchurl,
5 autoconf,
6 automake,
7 pkg-config,
8 intltool,
9 libxml2,
10 perlPackages,
11 goffice,
12 gnome,
13 adwaita-icon-theme,
14 wrapGAppsHook3,
15 glib,
16 gtk3,
17 bison,
18 python3Packages,
19 itstool,
20}:
21
22let
23 inherit (python3Packages) python pygobject3;
24in
25stdenv.mkDerivation (finalAttrs: {
26 pname = "gnumeric";
27 version = "1.12.59";
28
29 src = fetchurl {
30 url = "mirror://gnome/sources/gnumeric/${lib.versions.majorMinor finalAttrs.version}/gnumeric-${finalAttrs.version}.tar.xz";
31 sha256 = "yzdQsXbWQflCPfchuDFljIKVV1UviIf+34pT2Qfs61E=";
32 };
33
34 configureFlags = [ "--disable-component" ];
35
36 nativeBuildInputs = [
37 autoconf
38 automake
39 pkg-config
40 intltool
41 bison
42 itstool
43 glib # glib-compile-resources
44 libxml2 # xmllint
45 python.pythonOnBuildForHost
46 wrapGAppsHook3
47 ];
48
49 # ToDo: optional libgda, introspection?
50 # TODO: fix Perl plugin when cross-compiling
51 buildInputs = [
52 goffice
53 gtk3
54 adwaita-icon-theme
55 python
56 pygobject3
57 ]
58 ++ (with perlPackages; [
59 perl
60 XMLParser
61 ]);
62
63 enableParallelBuilding = true;
64
65 postPatch = ''
66 substituteInPlace configure.ac \
67 --replace-fail 'GLIB_COMPILE_RESOURCES=' 'GLIB_COMPILE_RESOURCES="glib-compile-resources"#'
68 '';
69
70 passthru = {
71 updateScript = gnome.updateScript {
72 packageName = "gnumeric";
73 versionPolicy = "odd-unstable";
74 };
75 };
76
77 meta = with lib; {
78 description = "GNOME Office Spreadsheet";
79 license = lib.licenses.gpl2Plus;
80 homepage = "http://projects.gnome.org/gnumeric/";
81 platforms = platforms.unix;
82 maintainers = [ maintainers.vcunat ];
83 };
84})