···11+/* Beware!
22+After starting Guake it will give the error message "Guake can not init! Gconf Error. Have you installed guake.schemas properly?",
33+which will have to be resolved manually, because I have not found a way to automate this, without being impure.
44+55+If you have Guake installed, you can use `nix-build -A gnome3.guake` to get the path to the build directory in the nix store,
66+which then can be used in the following command to install the schemas file of Guake:
77+gconftool-2 --install-schema-file /path/returned/by/nix-build/share/gconf/schemas/guake.schemas
88+99+It can be removed again by the following command:
1010+gconftool-2 --recursive-unset /apps/guake
1111+*/
1212+{ stdenv, fetchurl, lib
1313+, pkgconfig, libtool, intltool, makeWrapper
1414+, dbus, gtk2, gconf, python2, python2Packages, libutempter, vte, keybinder, gnome2, gnome3 }:
1515+1616+with lib;
1717+1818+let inputs = [ dbus gtk2 gconf python2 libutempter vte keybinder gnome3.gnome_common ];
1919+ pySubDir = "lib/${python2.libPrefix}/site-packages";
2020+ pyPath = makeSearchPath pySubDir (attrVals [ "dbus" "notify" "pyGtkGlade" "pyxdg" ] python2Packages ++ [ gnome2.gnome_python ]);
2121+ in stdenv.mkDerivation rec {
2222+ name = "guake-${version}";
2323+ version = "0.8.3";
2424+2525+ src = fetchurl {
2626+ url = "https://github.com/Guake/guake/archive/${version}.tar.gz";
2727+ sha256 = "1lbmdz3i9a97840h8239s360hd37nmhy3hs6kancxbzl1512ak1y";
2828+ };
2929+3030+ nativeBuildInputs = [ pkgconfig libtool intltool makeWrapper ];
3131+3232+ buildInputs = inputs ++ (with python2Packages; [ pyGtkGlade pyxdg ]);
3333+3434+ patchPhase = ''
3535+ patchShebangs .
3636+ '';
3737+3838+ configureScript = "./autogen.sh";
3939+4040+ configureFlags = [
4141+ "--sysconfdir=/etc"
4242+ "--localstatedir=/var"
4343+ "--disable-schemas-install"
4444+ ];
4545+4646+ installFlags = [
4747+ # Configuring the installation to not install gconf schemas is not always supported,
4848+ # therefore gconftool-2 has this variable, which will make gconftool-2 not update any of the databases.
4949+ "GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1"
5050+ "sysconfdir=\${out}/etc"
5151+ "localstatedir=\${TMPDIR}"
5252+ ];
5353+5454+ postInstall = ''
5555+ mkdir -p $out/share/gconf/schemas
5656+ cp data/guake.schemas $out/share/gconf/schemas
5757+ '';
5858+5959+ postFixup = ''
6060+ for bin in $out/bin/{guake,guake-prefs}; do
6161+ substituteInPlace $bin \
6262+ --replace '/usr/bin/env python2' ${python2}/bin/python2
6363+ wrapProgram $bin \
6464+ --prefix XDG_DATA_DIRS : "$out/share:$XDG_ICON_DIRS:$GSETTINGS_SCHEMAS_PATH" \
6565+ --prefix LD_LIBRARY_PATH : ${makeLibraryPath inputs} \
6666+ --prefix PYTHONPATH : "$out/${pySubDir}:${pyPath}:$PYTHONPATH"
6767+ done
6868+ '';
6969+7070+ meta = {
7171+ description = "Drop-down terminal for GNOME";
7272+ homepage = http://guake-project.org;
7373+ license = licenses.gpl2;
7474+ platforms = platforms.linux;
7575+ maintainers = [ maintainers.msteen ];
7676+ };
7777+}