gnome-tweak-tools: fix missing gi module

I changed from python3Packages to python2Packages because I couldn't
make it work with python3Packages. This seems similar to:
https://github.com/NixOS/nixpkgs/pull/16747#discussion_r69937281
This commit is contained in:
Damien Cassou 2016-07-12 16:50:56 +02:00
parent 81810c664b
commit a347b944d9

View File

@ -1,9 +1,11 @@
{ stdenv, intltool, fetchurl, python, pygobject3, atk
{ stdenv, intltool, fetchurl, atk
, pkgconfig, gtk3, glib, libsoup
, bash, makeWrapper, itstool, libxml2, python3Packages
, gnome3, librsvg, gdk_pixbuf, file, libnotify }:
, bash, makeWrapper, itstool, libxml2, python2Packages
, gnome3, librsvg, gdk_pixbuf, file, libnotify, gobjectIntrospection, wrapGAppsHook }:
stdenv.mkDerivation rec {
let
python = python2Packages.python.withPackages ( ps: with ps; [ pygobject3 ] );
in stdenv.mkDerivation rec {
inherit (import ./src.nix fetchurl) name src;
doCheck = true;
@ -15,17 +17,15 @@ stdenv.mkDerivation rec {
buildInputs = [ pkgconfig gtk3 glib intltool itstool libxml2
gnome3.gsettings_desktop_schemas makeWrapper file
gdk_pixbuf gnome3.defaultIconTheme librsvg
python pygobject3 libnotify gnome3.gnome_shell
libnotify gnome3.gnome_shell
libsoup gnome3.gnome_settings_daemon gnome3.nautilus
gnome3.gnome_desktop ];
gnome3.gnome_desktop wrapGAppsHook ];
preFixup = ''
wrapProgram "$out/bin/gnome-tweak-tool" \
--set GDK_PIXBUF_MODULE_FILE "$GDK_PIXBUF_MODULE_FILE" \
--suffix XDG_DATA_DIRS : "${gtk3}/share:${gnome3.gnome_themes_standard}/share:$out/share:$XDG_ICON_DIRS:$GSETTINGS_SCHEMAS_PATH" \
--prefix GI_TYPELIB_PATH : "$GI_TYPELIB_PATH" \
--prefix PYTHONPATH : "$PYTHONPATH:$(toPythonPath $out)"
'';
propagatedBuildInputs = [ python gobjectIntrospection ];
PYTHONPATH = "$out/${python.python.sitePackages}";
wrapPrefixVariables = [ "PYTHONPATH" ];
patches = [
./find_gsettings.patch