Compare commits

...

12 Commits

Author SHA1 Message Date
aszlig
69df841783
unity: Add Unity core package and dependencies.
Well, what a mess! Finally it's building successfully and even managed to do
some cleanups.

Probably most people might be wondering why I'm doing a port of Unity to Nix
while I personally don't use and/or even like it. The main reason is because I
tried to introduce someone to Nix and NixOS who actively uses Unity and doesn't
want to switch to something more sane^H^H^H^Hlightweight.

So let me introduce him: @gradel

He will be the new maintainer of the Unity desktop packages in Nix and I'm going
to mentor him during this process.

Enough about introduction, there still is a lot of work to do:

 * Improve directory structure of pkgs/desktop/unity.
 * Add more packages to propagatedBuildInputs to keep things DRY.
 * Maybe clean up my GIR compiler patch.
 * Add an update script to update all that stuff at once.
 * Separate the ugly sed hacks into nice clean patches.
 * Check build warnings and maybe fix them instead of removing -Werror.
 * Add missing dependencies.
 * Add missing meta information (I pretty much omitted about all of them).
 * The packages ibus, libgee and PackageKit obviously don't belong to unity,
   move them to the right locations.

And the biggest TODO:

Actually *test* it, as it is only UnityCore, I presume there is quite a bunch of
packages missing at this point.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
2012-12-12 05:45:16 +01:00
aszlig
827752a536
gtk3: Update to new upstream version 3.6.2.
Unity needs at least version 3.4, so let's just update to the latest version.
We're gonna extensively test this branch either so we can fix other packages
that depend on gtk3 as well, if it should be needed. Luckily there are just a
few of those.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
2012-12-12 05:44:37 +01:00
aszlig
8b574e9950
at-spi2: New package, starting at version 2.7.2.
This package consists of actually two packages:

 * at-spi-core: The core library
 * at-spi-atk: The atk-bridging library

The latter depends on the core library and is needed by unity, so watch out for
further buildInputs :-)

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
2012-12-12 05:44:37 +01:00
aszlig
0be7f115ac
glew: Copy GLEWmx libraries to output as well.
The normal "install" target only copies libglew and nothing more, no glewinfo,
no visualinfo and no GLEWmx libraries. This is now longer the case.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
2012-12-12 05:44:36 +01:00
aszlig
b5154a0222
glew: Symlink $out/lib64 to $out/lib.
Some packages tend to look into $out/lib only, which is the default in Nix
anyway as we don't need that lib32/lib64 separation.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
2012-12-12 05:44:36 +01:00
aszlig
c22d51d6f1
vala: Update to new upstream version 1.18.1.
Signed-off-by: aszlig <aszlig@redmoonstudios.org>
2012-12-12 05:44:36 +01:00
aszlig
43e73c1802
gtk3: Allow to build with gobject-introspection.
GIR is needed in order to build some vala-specific stuff in unity and/or its
various dependencies. I'm not sure whether we want to enable GIR by default, so
I'm leaving it optional right now.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
2012-12-12 05:44:35 +01:00
aszlig
46defaedf2
pango: Allow to build with gobject-introspection.
Signed-off-by: aszlig <aszlig@redmoonstudios.org>
2012-12-12 05:44:34 +01:00
aszlig
5a426c94a6
gdk-pixbuf: Allow to build with introspection.
Signed-off-by: aszlig <aszlig@redmoonstudios.org>
2012-12-12 05:44:34 +01:00
aszlig
99cf8f7cf2
atk: Allow to build with gobject-introspection.
Signed-off-by: aszlig <aszlig@redmoonstudios.org>
2012-12-12 05:44:31 +01:00
aszlig
d60d390a8a
gobject-introspection: Provide a setup hook.
Now the respective GIR paths should be set automatically when packages are using
gobjectIntrospection as a dependency.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
2012-12-12 05:44:31 +01:00
aszlig
c58bd8f242
gobject-introspection: Introduce GIR search path.
Allow to set a NIX_GIR_PATH environment variable which can be used to set a
search PATH for .gir files, where consecutive paths are separated by colons.

The implementation in compiler.c is very ugly and far from DRY, but I'm not an
expert with glib. So don't hesitate to improve things here if you have the
patience I definitely didn't have.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
2012-12-12 05:44:30 +01:00
31 changed files with 633 additions and 21 deletions

View File

@ -0,0 +1,28 @@
{ stdenv, fetchurl, gnome, pkgconfig, gtk2, gtk3, gobjectIntrospection
, dbus_glib, libwnck3, libgtop, libunityWebapps, vala
}:
stdenv.mkDerivation rec {
name = "bamf-${version}";
version = "0.3.4";
src = fetchurl {
url = "http://launchpad.net/bamf/0.3/${version}/+download/${name}.tar.gz";
sha256 = "0a4l91vqyqzzkgcahbaqg1hbh2fd53za3i187q1944i1g32kx9r5";
};
VALA_API_GEN = with stdenv.lib; let
pkgs = [ gobjectIntrospection ];
argify = p: "--girdir=${p}/share/gir-1.0 --vapidir=${p}/share/vala/vapi";
args = map argify pkgs;
in "${vala}/bin/vapigen ${concatStringsSep " " args}";
buildInputs = [
pkgconfig gnome.gtkdoc gtk2 gtk3 gobjectIntrospection dbus_glib libgtop
libunityWebapps vala
];
propagatedBuildInputs = [
libwnck3
];
}

View File

@ -0,0 +1,13 @@
{ stdenv, fetchurl, python, pkgconfig, glib, gobjectIntrospection, icu }:
stdenv.mkDerivation rec {
name = "dee-${version}";
version = "1.0.14";
src = fetchurl {
url = "http://launchpad.net/dee/1.0/${version}/+download/${name}.tar.gz";
sha256 = "0302lfndmplvv5crf70myhxh5vsisjs1czdqx2xnrvylnxz1hwqi";
};
buildInputs = [ python pkgconfig glib gobjectIntrospection icu ];
}

View File

@ -0,0 +1,21 @@
{ callPackage, pkgs }:
rec {
bamf = callPackage ./bamf.nix { };
dee = callPackage ./dee.nix { };
frame = callPackage ./frame.nix { };
geis = callPackage ./geis.nix { };
grail = callPackage ./grail.nix { };
ibus = callPackage ./ibus.nix { };
indicatorMessages = callPackage ./indicator-messages.nix { };
libdbusmenu = callPackage ./libdbusmenu.nix { };
libgee = callPackage ./libgee.nix { };
libindicator = callPackage ./libindicator.nix { };
libunity = callPackage ./libunity.nix { };
libunityMisc = callPackage ./libunity-misc.nix { };
libunityWebapps = callPackage ./libunity-webapps.nix { };
libzeitgeist = callPackage ./libzeitgeist.nix { };
nux = callPackage ./nux.nix { };
packagekit = callPackage ./packagekit.nix { };
unity = callPackage ./unity.nix { };
}

View File

@ -0,0 +1,81 @@
This is patch is from ArchLinux and can be found here as well:
https://aur.archlinux.org/packages/unity/
diff -Naur unity-6.12.0.orig/launcher/PointerBarrier.cpp unity-6.12.0/launcher/PointerBarrier.cpp
--- unity-6.12.0.orig/launcher/PointerBarrier.cpp 2012-11-06 15:34:13.000000000 +0100
+++ unity-6.12.0/launcher/PointerBarrier.cpp 2012-11-22 10:45:28.046339668 +0100
@@ -65,18 +65,8 @@
int maj,min;
XFixesQueryVersion(dpy, &maj, &min);
- barrier = XFixesCreatePointerBarrierVelocity(dpy,
- DefaultRootWindow(dpy),
- x1, y1,
- x2, y2,
- static_cast<int>(direction),
- threshold,
- 0,
- NULL);
-
if (!local::is_selected_for)
{
- XFixesSelectBarrierInput(dpy, DefaultRootWindow(dpy), 0xdeadbeef);
local::is_selected_for = true;
}
@@ -104,7 +94,7 @@
void PointerBarrierWrapper::ReleaseBarrier(int event_id)
{
- XFixesBarrierReleasePointer(nux::GetGraphicsDisplay()->GetX11Display(), barrier, event_id);
+ return;
}
void PointerBarrierWrapper::EmitCurrentData(int event_id, int x, int y)
@@ -123,45 +113,6 @@
bool PointerBarrierWrapper::HandleEvent(XEvent xevent)
{
- if (xevent.type - event_base_ == XFixesBarrierNotify)
- {
- auto notify_event = reinterpret_cast<XFixesBarrierNotifyEvent*>(&xevent);
-
- if (notify_event->barrier == barrier && notify_event->subtype == XFixesBarrierHitNotify)
- {
- smoothing_accum_ += notify_event->velocity;
- smoothing_count_++;
-
- if (released)
- {
- /* If the barrier is released, just emit the current event without
- * waiting, so there won't be any delay on releasing the barrier. */
- smoothing_timeout_.reset();
- auto event = std::make_shared<BarrierEvent>(notify_event->x, notify_event->y,
- notify_event->velocity, notify_event->event_id);
- barrier_event.emit(this, event);
- }
- else if (!smoothing_timeout_)
- {
- int x = notify_event->x;
- int y = notify_event->y;
- int event = notify_event->event_id;
-
- auto smoothing_cb = [&, event, x, y] ()
- {
- EmitCurrentData(event, x, y);
-
- smoothing_timeout_.reset();
- return false;
- };
-
- smoothing_timeout_.reset(new glib::Timeout(smoothing, smoothing_cb));
- }
- }
-
- return notify_event->barrier == barrier;
- }
-
return false;
}

View File

@ -0,0 +1,14 @@
{ stdenv, fetchurl, pkgconfig, x11, xorgserver, libXi }:
stdenv.mkDerivation rec {
name = "frame-${version}";
version = "2.4.4";
src = fetchurl {
url = "http://launchpad.net/frame/trunk/${version}"
+ "/+download/${name}.tar.xz";
sha256 = "1pbnl9l84ca17641lrwzidkkl7ysffl26mbp1r245y0kf4kdxqi3";
};
buildInputs = [ pkgconfig x11 xorgserver libXi ];
}

View File

@ -0,0 +1,19 @@
{ stdenv, fetchurl, pkgconfig, python, dbus, grail, x11, libxcb, libXi
, xorgserver
}:
stdenv.mkDerivation rec {
name = "geis-${version}";
version = "2.2.14";
src = fetchurl {
url = "http://launchpad.net/geis/trunk/${version}/+download/${name}.tar.xz";
sha256 = "1xrn267cr4d9q0akd02wvpjv1cjvyxzp1f2fi3191m3ph556m5f6";
};
buildInputs = [ pkgconfig python dbus grail x11 libxcb libXi xorgserver ];
preConfigure = ''
sed -i -e 's/ -Werror//g' configure
'';
}

View File

@ -0,0 +1,15 @@
{ stdenv, fetchurl, pkgconfig, frame, x11, libXi }:
stdenv.mkDerivation rec {
name = "grail-${version}";
version = "3.0.9";
src = fetchurl {
url = "http://launchpad.net/grail/trunk/${version}"
+ "/+download/${name}.tar.bz2";
sha256 = "0gri8vcknxg0rj2jmsxipim2dd9zfs53q552k7i9dyn9sjwxip6p";
};
buildInputs = [ pkgconfig x11 libXi ];
propagatedBuildInputs = [ frame ];
}

View File

@ -0,0 +1,18 @@
{ stdenv, fetchurl, pkgconfig, intltool, glib, gtk2, gtk3, dbus
, gnome, python, pythonDBus, isocodes
}:
stdenv.mkDerivation rec{
name = "ibus-${version}";
version = "1.4.2";
src = fetchurl {
url = "http://ibus.googlecode.com/files/${name}.tar.gz";
sha1 = "a2d11d8bb64761691df918e9e50f0b35c711760d";
};
buildInputs = [
pkgconfig intltool glib gtk2 gtk3 dbus
gnome.GConf python pythonDBus isocodes
];
}

View File

@ -0,0 +1,16 @@
{ stdenv, fetchurl, pkgconfig, intltool, gtk3, libindicator }:
stdenv.mkDerivation rec {
name = "indicator-messages-${version}";
version = "12.10.5";
src = fetchurl {
url = "http://launchpad.net/indicator-messages/12.10/${version}"
+ "/+download/${name}.tar.gz";
sha256 = "0bq4bbacjlpixf5h229y2998b703qb6cv11mrv0wzs4rydz77zkx";
};
configureFlags = [ "--enable-localinstall" ];
buildInputs = [ pkgconfig intltool gtk3 libindicator ];
}

View File

@ -0,0 +1,20 @@
{ stdenv, fetchurl, pkgconfig, intltool, glib, gnome, gnome_doc_utils
, gtk2, gtk3, atk, json_glib, gobjectIntrospection
}:
let
gtk3gir = gtk3.override { enableIntrospection = true; };
in stdenv.mkDerivation rec {
name = "libdbusmenu-${version}";
version = "12.10.2";
src = fetchurl {
url = "http://launchpad.net/dbusmenu/12.10/${version}/+download/${name}.tar.gz";
sha256 = "1j84klglil1227f6vvhcrc0vcph9ib70q8z95snl5cqqp6hd8slx";
};
buildInputs = [
pkgconfig intltool glib gnome.gtkdoc gnome_doc_utils
gtk2 gtk3gir atk json_glib gobjectIntrospection
];
}

View File

@ -0,0 +1,24 @@
{ stdenv, fetchurl, pkgconfig, glib, vala, gobjectIntrospection }:
stdenv.mkDerivation rec {
name = "libgee-${version}";
version = "0.6.7";
src = fetchurl {
url = "mirror://gnome/sources/libgee/0.6/${name}.tar.xz";
sha256 = "0v8h2ha1pc55kvqy68hbav69ckidqhjw7yp59ck6mfzvhlbvy4mm";
};
prePatch = ''
sed -i -r \
-e "s|(INTROSPECTION_TYPELIBDIR=).*|\1\"$out/lib/girepository-1.0\"|" \
-e "s|(INTROSPECTION_GIRDIR=).*|\1\"$out/share/gir-1.0\"|" \
configure
'';
buildInputs = [ pkgconfig glib vala gobjectIntrospection ];
meta = {
description = "GObject collection library";
};
}

View File

@ -0,0 +1,14 @@
{ stdenv, fetchurl, pkgconfig, intltool, gtk3 }:
stdenv.mkDerivation rec {
name = "libindicator-${version}";
version = "12.10.1";
src = fetchurl {
url = "http://launchpad.net/libindicator/12.10/${version}"
+ "/+download/${name}.tar.gz";
sha256 = "0zs4z7l9b57jldwz0ban77f3c2zq43ambd0dssf5qg9i216f9lmj";
};
buildInputs = [ pkgconfig intltool gtk3 ];
}

View File

@ -0,0 +1,14 @@
{ stdenv, fetchurl, pkgconfig, glib, gtk3 }:
stdenv.mkDerivation rec {
name = "libunity-misc-${version}";
version = "4.0.4";
src = fetchurl {
url = "https://launchpad.net/libunity-misc/trunk/"
+ "${version}/+download/${name}.tar.gz";
sha256 = "1jd08ksxb9wq08kc8y10z6hik1zbnxc9bqkz7p8i7rfrsaqprsld";
};
buildInputs = [ pkgconfig glib gtk3 ];
}

View File

@ -0,0 +1,26 @@
{ stdenv, fetchurl, pkgconfig, intltool, glib, gobjectIntrospection
, gdk_pixbuf, libwnck3, json_glib, libsoup, packagekit, polkit, telepathy_glib
, libnotify, libunity, indicatorMessages, geoclue, libdbusmenu, gtk2
}:
stdenv.mkDerivation rec {
name = "libunity-webapps-${version}";
version = "2.4.3";
src = fetchurl {
url = "http://launchpad.net/libunity-webapps/2.4/${version}"
+ "/+download/unity_webapps-2.4.3.tar.gz";
sha256 = "1jr0ci7azp6x4p7gnq5pfvpnrawdr3bdidahl52qvglf49127i5y";
};
prePatch = ''
sed -i -e 's/notify_notification_new[^)]*/&, NULL/' \
src/context-daemon/unity-webapps-notification-context.c
'';
buildInputs = [
intltool pkgconfig glib gobjectIntrospection gdk_pixbuf libwnck3 json_glib
libsoup packagekit polkit telepathy_glib libnotify libunity
indicatorMessages geoclue libdbusmenu gtk2
];
}

View File

@ -0,0 +1,27 @@
{ stdenv, fetchurl, pkgconfig, intltool, gnome, glib, gobjectIntrospection
, vala, python, libgee, dee, libdbusmenu, gtk3
}:
stdenv.mkDerivation rec {
name = "libunity-${version}";
version = "6.12.0";
src = fetchurl {
url = "http://launchpad.net/libunity/6.0/${version}"
+ "/+download/${name}.tar.gz";
sha256 = "1nadapl3390x98q1wv2yarh60hzi7ck0d1s8zz9xsiq3zz6msbjd";
};
VALAC = with stdenv.lib; let
pkgs = [ gobjectIntrospection libgee dee libdbusmenu ];
argify = p: "--girdir=${p}/share/gir-1.0 --vapidir=${p}/share/vala/vapi";
args = map argify pkgs;
in "${vala}/bin/valac ${concatStringsSep " " args}";
buildInputs = [
pkgconfig intltool gnome.gnome_common glib gobjectIntrospection vala python
libdbusmenu gtk3
];
propagatedBuildInputs = [ dee libgee ];
}

View File

@ -0,0 +1,14 @@
{ stdenv, fetchurl, pkgconfig, glib }:
stdenv.mkDerivation rec {
name = "libzeitgeist-${version}";
version = "0.3.18";
src = fetchurl {
url = "http://launchpad.net/libzeitgeist/0.3/${version}"
+ "/+download/${name}.tar.gz";
sha256 = "0wqgz3yw0czpgxy9gyjx7mzwa8xisps5xrp3p0c0aq38gbcjihc2";
};
buildInputs = [ pkgconfig glib ];
}

View File

@ -0,0 +1,23 @@
{ stdenv, fetchurl, pkgconfig, libtool, glib, libsigcxx, gdk_pixbuf, cairo
, mesa, glew, x11, libXext, libXxf86vm, libXinerama, libXcomposite
, libXdamage, pango, pciutils, ibus, boost, geis
}:
stdenv.mkDerivation rec {
name = "nux-${version}";
version = "3.10.0";
src = fetchurl {
url = "http://launchpad.net/nux/3.0/3.10/+download/${name}.tar.gz";
sha256 = "1h06hv74fv0a7fwcr91ca8f16qq70igyxgwbcs0xmbn94vzbjjnn";
};
buildInputs = [
libtool pkgconfig glib libsigcxx gdk_pixbuf cairo mesa x11 libXext
libXinerama libXcomposite libXdamage pango pciutils ibus boost
];
propagatedBuildInputs = [ geis glew libXxf86vm ];
enableParallelBuilding = true;
}

View File

@ -0,0 +1,23 @@
{ stdenv, fetchurl, pkgconfig, intltool, gnome, glib, sqlite, python
, systemd, polkit
}:
stdenv.mkDerivation rec {
name = "PackageKit-${version}";
version = "0.8.6";
src = fetchurl {
url = "http://www.packagekit.org/releases/${name}.tar.xz";
sha256 = "0y52di6y4j9wxsjpnarmgv84a8ap7bzzg8aplfblp0f5j5ykxzik";
};
configureFlags = [
"--with-systemdsystemunitdir=$(out)/etc/systemd/system"
"--with-systemdutildir=$(out)/lib/systemd/system-sleep"
];
buildInputs = [
pkgconfig intltool gnome.gtkdoc glib sqlite python systemd
polkit
];
}

View File

@ -0,0 +1,40 @@
{ stdenv, fetchurl, cmake, pkgconfig, gettext, compiz, nux, bamf, dee, glib
, libdbusmenu, x11, gnome, libindicator, atk, at_spi2_atk, dbus_glib, gtk2, gtk3
, libsigcxx, json_glib, libnotify, libzeitgeist, libunity, libunityMisc
, libXdamage, libXdmcp, libXau, libxml2, libxslt, libpthreadstubs, glibmm
, libdrm, mesa, boost
}:
stdenv.mkDerivation rec {
name = "unity-${version}";
version = "6.12.0";
src = fetchurl {
url = "http://launchpad.net/unity/6.0/${version}/+download/${name}.tar.gz";
sha256 = "1h8qch4339pyyiikv0f0jzfhysmknfcazy26pbf1lya5ih62yhag";
};
prePatch = ''
find . -name "CMakeLists.txt" -exec sed -i 's/-Werror *//g' '{}' +
sed -e '/notify_notification_new(/,/nullptr)/s/nullptr/&, nullptr/' \
-e 's/\(notify_notification_set_\)image\(_from_pixbuf\)/\1icon\2/' \
-e 's/\(notify_notification_set_hint\) *(.*/\/* XXX: & *\//' \
-i launcher/DeviceNotificationDisplayImp.cpp
'';
patches = [ ./disable-pointerbarrier.patch ];
enableParallelBuilding = true;
cmakeFlags = [
"-DGSETTINGS_LOCALINSTALL=1"
"-DCMAKE_MODULE_PATH=${compiz}/share/cmake-2.8"
];
buildInputs = [
cmake pkgconfig gettext compiz nux bamf dee glib libdbusmenu x11
gnome.startupnotification libindicator atk at_spi2_atk dbus_glib gtk2 gtk3
libsigcxx json_glib libnotify libzeitgeist libunity libunityMisc libXdamage
libXdmcp libXau libxml2 libxslt libpthreadstubs glibmm libdrm mesa boost
];
}

View File

@ -2,12 +2,12 @@
stdenv.mkDerivation rec {
version = "0.17.2";
version = "0.18.1";
name = "vala-${version}";
src = fetchurl {
url = "mirror://gnome/sources/vala/0.17/${name}.tar.xz";
sha256 = "09i2s0dwmrk147ind2dx7nq845g12fp6fsjqrphhrr0dbi0zzgh3";
url = "mirror://gnome/sources/vala/0.18/${name}.tar.xz";
sha256 = "0cnaplhw1gf6m5xk62h01fhx0yisvjzr7bxc2g7s57rzl262wpkz";
};
buildNativeInputs = [ yacc flex pkgconfig xz ];

View File

@ -0,0 +1,13 @@
{ stdenv, fetchurl, pkgconfig, at_spi2_core, dbus, glib, atk }:
stdenv.mkDerivation rec {
name = "at-spi2-atk-${version}";
version = "2.7.2";
buildInputs = [ pkgconfig at_spi2_core dbus glib atk ];
src = fetchurl {
url = "mirror://gnome/sources/at-spi2-atk/2.7/${name}.tar.xz";
sha256 = "dbce8f6828ec4be619d7c6db797385063ee2f7365dfe57d08eea013d61bf1a73";
};
}

View File

@ -0,0 +1,15 @@
{ stdenv, fetchurl, pkgconfig, intltool, dbus, glib
, x11, libXtst, libXi
}:
stdenv.mkDerivation rec {
name = "at-spi2-core-${version}";
version = "2.7.2";
propagatedBuildInputs = [ pkgconfig intltool dbus glib x11 libXtst libXi ];
src = fetchurl {
url = "mirror://gnome/sources/at-spi2-core/2.7/${name}.tar.xz";
sha256 = "da87a2a475014552f15ae5435c993ca54d47e5e68826165f643577dde99be355";
};
}

View File

@ -1,4 +1,8 @@
{ stdenv, fetchurl, pkgconfig, perl, glib }:
{ stdenv, fetchurl, pkgconfig, perl, glib
, enableIntrospection ? false, gobjectIntrospection ? null
}:
assert enableIntrospection -> gobjectIntrospection != null;
stdenv.mkDerivation rec {
name = "atk-2.6.0";
@ -10,7 +14,8 @@ stdenv.mkDerivation rec {
buildNativeInputs = [ pkgconfig perl ];
propagatedBuildInputs = [ glib ];
propagatedBuildInputs = [ glib ]
++ stdenv.lib.optional enableIntrospection gobjectIntrospection;
postInstall = "rm -rf $out/share/gtk-doc";

View File

@ -1,4 +1,8 @@
{ stdenv, fetchurl, pkgconfig, glib, libtiff, libjpeg, libpng, libX11, xz, jasper }:
{ stdenv, fetchurl, pkgconfig, glib, libtiff, libjpeg, libpng, libX11, xz, jasper
, enableIntrospection ? false, gobjectIntrospection ? null
}:
assert enableIntrospection -> gobjectIntrospection != null;
stdenv.mkDerivation rec {
name = "gdk-pixbuf-2.26.1";
@ -9,7 +13,8 @@ stdenv.mkDerivation rec {
};
# !!! We might want to factor out the gdk-pixbuf-xlib subpackage.
buildInputs = [ libX11 ];
buildInputs = [ libX11 ]
++ stdenv.lib.optional enableIntrospection gobjectIntrospection;
buildNativeInputs = [ pkgconfig ];

View File

@ -11,12 +11,18 @@ stdenv.mkDerivation rec {
buildInputs = [ mesa x11 libXmu libXi ];
installPhase = "
GLEW_DEST=\$out make install
GLEW_DEST=\$out make install.all
mkdir -pv \$out/share/doc/glew
cp -r README.txt LICENSE.txt doc \$out/share/doc/glew
";
meta = {
postFixup = ''
if [ -d "$out/lib64" ]; then
ln -s lib64 "$out/lib"
fi
'';
meta = {
description = "Cross-platform open-source C/C++ extension loading library";
homepage = http://glew.sourceforge.net/;
license = ["BSD" "GLX" "SGI-B" "GPL2"]; # License description copied from gentoo-1.4.0

View File

@ -15,6 +15,10 @@ stdenv.mkDerivation rec {
sha256 = "80e211ea95404fc7c5fa3b04ba69ee0b29af70847af315155ab06b8cff832c85";
};
patches = ./gir_nix_path.patch;
setupHook = ./setup-hook.sh;
postInstall = "rm -rf $out/share/gtk-doc";
meta = with stdenv.lib; {

View File

@ -0,0 +1,79 @@
Allow to set NIX_GIR_PATH as an environment variable to specify GIR search paths
delimited by colons.
diff --git a/giscanner/scannermain.py b/giscanner/scannermain.py
index 794cede..9a8c25f 100755
--- a/giscanner/scannermain.py
+++ b/giscanner/scannermain.py
@@ -64,6 +64,12 @@ def get_windows_option_group(parser):
return group
+def _get_nix_gir_path():
+ nixgir = os.environ.get('NIX_GIR_PATH', None)
+ if nixgir is None:
+ return []
+ return nixgir.split(':')
+
def _get_option_parser():
parser = optparse.OptionParser('%prog [options] sources')
parser.add_option('', "--quiet",
@@ -84,7 +90,8 @@ def _get_option_parser():
"when building multiple .gir files inside a "
"single module."""))
parser.add_option("", "--add-include-path",
- action="append", dest="include_paths", default=[],
+ action="append", dest="include_paths",
+ default=_get_nix_gir_path(),
help="include paths for other GIR files")
parser.add_option("", "--program",
action="store", dest="program", default=None,
diff --git a/tools/compiler.c b/tools/compiler.c
index 7e17f1b..6cf12ad 100644
--- a/tools/compiler.c
+++ b/tools/compiler.c
@@ -147,6 +147,10 @@ main (int argc, char ** argv)
GError *error = NULL;
GIrParser *parser;
GIrModule *module;
+ GList *l, *includelist = NULL;
+ gchar **all_includes;
+ const char *envp;
+ gchar *gp_start, *gp_end, *girpath;
gint i;
g_typelib_check_sanity ();
@@ -182,7 +186,32 @@ main (int argc, char ** argv)
parser = _g_ir_parser_new ();
- _g_ir_parser_set_includes (parser, (const char*const*) includedirs);
+ if ((envp = g_getenv("NIX_GIR_PATH")) == NULL) {
+ _g_ir_parser_set_includes (parser, (const char*const*) includedirs);
+ } else {
+ girpath = gp_start = g_strdup(envp);
+ while (gp_start) {
+ if ((gp_end = strchr(gp_start, ':')) != NULL)
+ *(gp_end++) = '\0';
+ g_irepository_prepend_search_path(gp_start);
+ includelist = g_list_append(includelist, gp_start);
+ gp_start = gp_end;
+ }
+
+ if (includedirs != NULL)
+ for (i = 0; includedirs[i]; i++)
+ includelist = g_list_append(includelist, includedirs[i]);
+
+ all_includes = g_malloc0(sizeof(gchar*) * (g_list_length(includelist) + 1));
+
+ for (i = 0, l = includelist; l; l = l->next)
+ all_includes[i++] = g_strdup(l->data);
+
+ g_list_free(includelist);
+ g_free(girpath);
+
+ _g_ir_parser_set_includes (parser, (const char*const*) all_includes);
+ }
module = _g_ir_parser_parse_file (parser, input[0], &error);
if (module == NULL)

View File

@ -0,0 +1,7 @@
addGirPath()
{
addToSearchPathWithCustomDelimiter : \
NIX_GIR_PATH "$1/share/gir-1.0"
}
envHooks=(${envHooks[@]} addGirPath)

View File

@ -1,18 +1,30 @@
{ stdenv, fetchurl, pkgconfig, glib, atk, pango, cairo, perl, xlibs
, gdk_pixbuf, xz
{ stdenv, fetchurl, pkgconfig, glib, atk, at_spi2_atk, pango, cairo, perl
, xlibs, gdk_pixbuf, xz
, xineramaSupport ? true
, cupsSupport ? true, cups ? null
, enableIntrospection ? false, gobjectIntrospection ? null
}:
assert xineramaSupport -> xlibs.libXinerama != null;
assert cupsSupport -> cups != null;
assert enableIntrospection -> gobjectIntrospection != null;
stdenv.mkDerivation rec {
name = "gtk+-3.2.4";
let
pixbufGir = gdk_pixbuf.override {
inherit enableIntrospection;
};
pangoGir = pango.override {
inherit enableIntrospection;
};
atkGir = atk.override {
inherit enableIntrospection;
};
in stdenv.mkDerivation rec {
name = "gtk+-3.6.2";
src = fetchurl {
url = "mirror://gnome/sources/gtk+/3.2/${name}.tar.xz";
sha256 = "f981bf514858c00d7084bd6f6c34b3c60b8aebdb959e7aca6faa59ed67c136bd";
url = "mirror://gnome/sources/gtk+/3.6/${name}.tar.xz";
sha256 = "0g2izqjvwxkhhjrna5iqby9qi67ix1w0aa8ng3rsqf33azhz5k5a";
};
enableParallelBuilding = true;
@ -20,11 +32,12 @@ stdenv.mkDerivation rec {
buildNativeInputs = [ perl pkgconfig ];
propagatedBuildInputs =
[ xlibs.xlibs glib atk pango gdk_pixbuf cairo
[ xlibs.xlibs glib pangoGir pixbufGir atkGir at_spi2_atk cairo
xlibs.libXrandr xlibs.libXrender xlibs.libXcomposite xlibs.libXi
]
++ stdenv.lib.optional xineramaSupport xlibs.libXinerama
++ stdenv.lib.optionals cupsSupport [ cups ];
++ stdenv.lib.optionals cupsSupport [ cups ]
++ stdenv.lib.optional enableIntrospection gobjectIntrospection;
postInstall = "rm -rf $out/share/gtk-doc";

View File

@ -1,4 +1,8 @@
{ stdenv, fetchurl, pkgconfig, gettext, x11, glib, cairo, libpng }:
{ stdenv, fetchurl, pkgconfig, gettext, x11, glib, cairo, libpng
, enableIntrospection ? false, gobjectIntrospection ? null
}:
assert enableIntrospection -> gobjectIntrospection != null;
stdenv.mkDerivation rec {
name = "pango-1.30.1";
@ -12,7 +16,8 @@ stdenv.mkDerivation rec {
buildNativeInputs = [ pkgconfig ];
propagatedBuildInputs = [ x11 glib cairo libpng ];
propagatedBuildInputs = [ x11 glib cairo libpng ]
++ stdenv.lib.optional enableIntrospection gobjectIntrospection;
enableParallelBuilding = true;

View File

@ -3322,6 +3322,9 @@ let
inherit fetchurl stdenv aspell which;
});
at_spi2_core = callPackage ../development/libraries/at-spi2/core.nix { };
at_spi2_atk = callPackage ../development/libraries/at-spi2/atk.nix { };
aterm = aterm25;
aterm25 = callPackage ../development/libraries/aterm/2.5.nix { };
@ -3878,7 +3881,7 @@ let
gtkmm = callPackage ../development/libraries/gtkmm/2.24.x.nix { };
gtkmm3 = callPackage ../development/libraries/gtkmm/3.2.x.nix { };
gtk3 = lowPrio (callPackage ../development/libraries/gtk+/3.2.x.nix { });
gtk3 = lowPrio (callPackage ../development/libraries/gtk+/3.6.x.nix { });
gtkmozembedsharp = callPackage ../development/libraries/gtkmozembed-sharp {
gtksharp = gtksharp2;
@ -8542,6 +8545,13 @@ let
oxygen_gtk = callPackage ../misc/themes/gtk2/oxygen-gtk { };
unity = let
callPackage = newScope pkgs.unity;
unityPkgs = import ../desktops/unity {
inherit callPackage pkgs;
};
in recurseIntoAttrs unityPkgs;
xfce = xfce48;
xfce48 = recurseIntoAttrs