about summary refs log tree commit diff
path: root/pkgs/desktops/gnome-2/bindings
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/desktops/gnome-2/bindings')
-rw-r--r--pkgs/desktops/gnome-2/bindings/gnome-python-desktop/default.nix32
-rw-r--r--pkgs/desktops/gnome-2/bindings/python-rsvg/default.nix33
2 files changed, 32 insertions, 33 deletions
diff --git a/pkgs/desktops/gnome-2/bindings/gnome-python-desktop/default.nix b/pkgs/desktops/gnome-2/bindings/gnome-python-desktop/default.nix
new file mode 100644
index 000000000000..b33afb50e99a
--- /dev/null
+++ b/pkgs/desktops/gnome-2/bindings/gnome-python-desktop/default.nix
@@ -0,0 +1,32 @@
+{ stdenv, fetchurl, gnome_python, librsvg, libwnck, libgtop, pkgconfig, python2, gtk }:
+
+let
+  inherit (python2.pkgs) python pygtk;
+in stdenv.mkDerivation rec {
+  ver_maj = "2.32";
+  ver_min = "0";
+  version = "${ver_maj}.${ver_min}";
+  name = "gnome-python-desktop-${version}";
+
+  src = fetchurl {
+    url = "mirror://gnome/sources/gnome-python-desktop/${ver_maj}/gnome-python-desktop-${version}.tar.bz2";
+    sha256 = "1s8f9rns9v7qlwjv9qh9lr8crp88dpzfm45hj47zc3ivpy0dbnq9";
+  };
+
+  nativeBuildInputs = [ pkgconfig ];
+  buildInputs = [ gtk librsvg libwnck libgtop python ];
+  propagatedBuildInputs = [ gnome_python pygtk ];
+
+  # gnome-python-desktop expects that .pth file is already installed by PyGTK
+  # in the same directory. This is not the case for Nix.
+  postInstall = ''
+    echo "gtk-2.0" > $out/${python2.sitePackages}/${name}.pth
+  '';
+
+  meta = with stdenv.lib; {
+    homepage = "http://www.pygtk.org";
+    description = "Python bindings for GNOME desktop packages";
+    license = licenses.lgpl21;
+    maintainers = [ maintainers.goibhniu ];
+  };
+}
diff --git a/pkgs/desktops/gnome-2/bindings/python-rsvg/default.nix b/pkgs/desktops/gnome-2/bindings/python-rsvg/default.nix
deleted file mode 100644
index c862bee0c906..000000000000
--- a/pkgs/desktops/gnome-2/bindings/python-rsvg/default.nix
+++ /dev/null
@@ -1,33 +0,0 @@
-{ stdenv, fetchurl, gnome2, librsvg, pkgconfig, python27Packages, gtk }:
-
-let
-  inherit (python27Packages) python pygtk;
-in stdenv.mkDerivation rec {
-  ver_maj = "2.32";
-  ver_min = "0";
-  version = "${ver_maj}.${ver_min}";
-  name = "python-rsvg-${version}";
-
-  src = fetchurl {
-    url = "mirror://gnome/sources/gnome-python-desktop/${ver_maj}/gnome-python-desktop-${version}.tar.bz2";
-    sha256 = "1s8f9rns9v7qlwjv9qh9lr8crp88dpzfm45hj47zc3ivpy0dbnq9";
-  };
-
-  configurePhase = ''
-    sed -e "s@{PYTHONDIR}/gtk-2.0@{PYTHONDIR}/@" -i rsvg/wscript
-    python waf configure --enable-modules=rsvg --prefix=$out
-  '';
-
-  buildPhase = "python waf build";
-
-  installPhase = "python waf install";
-
-  buildInputs = [ gtk gnome2.gnome_python librsvg pkgconfig pygtk python ];
-
-  meta = with stdenv.lib; {
-    homepage = "http://www.pygtk.org";
-    description = "The rsvg python module";
-    license = licenses.lgpl21;
-    maintainers = [ maintainers.goibhniu ];
-  };
-}