summary refs log tree commit diff
path: root/pkgs/desktops/gnome-2/bindings/gnome-python-desktop/default.nix
blob: 86d92adbea80807d05c5e9a8e92fb297a3f46324 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
{ lib, stdenv, fetchurl, gnome_python, librsvg, libwnck, libgtop, pkg-config, python2, gtk2 }:

let
  inherit (python2.pkgs) python pygtk;
in stdenv.mkDerivation rec {
  ver_maj = "2.32";
  ver_min = "0";
  version = "${ver_maj}.${ver_min}";
  pname = "gnome-python-desktop";

  src = fetchurl {
    url = "mirror://gnome/sources/gnome-python-desktop/${ver_maj}/gnome-python-desktop-${version}.tar.bz2";
    sha256 = "1s8f9rns9v7qlwjv9qh9lr8crp88dpzfm45hj47zc3ivpy0dbnq9";
  };

  nativeBuildInputs = [ pkg-config ];
  buildInputs = [ gtk2 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}/${pname}-${version}.pth
  '';

  meta = with lib; {
    homepage = "http://www.pygtk.org";
    description = "Python bindings for GNOME desktop packages";
    license = licenses.lgpl21;
    maintainers = [ maintainers.goibhniu ];
  };
}