summary refs log tree commit diff
path: root/pkgs/applications/misc/guake
diff options
context:
space:
mode:
authorJan Tojnar <jtojnar@gmail.com>2018-04-09 13:46:46 +0200
committerJan Tojnar <jtojnar@gmail.com>2018-04-12 10:58:23 +0200
commita9bc7b7c7350af40e47735cf8e4c4030514c2880 (patch)
tree13567983d1e3f3bcae0a10ece72bd1d453b5257b /pkgs/applications/misc/guake
parent24827a58fbca47aba7c73f9164365bcbc7b8ffdb (diff)
downloadnixlib-a9bc7b7c7350af40e47735cf8e4c4030514c2880.tar
nixlib-a9bc7b7c7350af40e47735cf8e4c4030514c2880.tar.gz
nixlib-a9bc7b7c7350af40e47735cf8e4c4030514c2880.tar.bz2
nixlib-a9bc7b7c7350af40e47735cf8e4c4030514c2880.tar.lz
nixlib-a9bc7b7c7350af40e47735cf8e4c4030514c2880.tar.xz
nixlib-a9bc7b7c7350af40e47735cf8e4c4030514c2880.tar.zst
nixlib-a9bc7b7c7350af40e47735cf8e4c4030514c2880.zip
guake: 0.8.3 → 3.1.0
Diffstat (limited to 'pkgs/applications/misc/guake')
-rw-r--r--pkgs/applications/misc/guake/default.nix84
1 files changed, 27 insertions, 57 deletions
diff --git a/pkgs/applications/misc/guake/default.nix b/pkgs/applications/misc/guake/default.nix
index 0a2a17fc8fa0..778f273f8122 100644
--- a/pkgs/applications/misc/guake/default.nix
+++ b/pkgs/applications/misc/guake/default.nix
@@ -1,76 +1,46 @@
-/* Beware!
-After starting Guake it will give the error message "Guake can not init! Gconf Error. Have you installed guake.schemas properly?",
-which will have to be resolved manually, because I have not found a way to automate this, without being impure.
-
-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,
-which then can be used in the following command to install the schemas file of Guake:
-gconftool-2 --install-schema-file /path/returned/by/nix-build/share/gconf/schemas/guake.schemas
-
-It can be removed again by the following command:
-gconftool-2 --recursive-unset /apps/guake
-*/
-{ stdenv, fetchurl, lib
-, pkgconfig, libtool, intltool, makeWrapper
-, dbus, gtk2, gconf, python2Packages, libutempter, vte, keybinder, gnome2, gnome3 }:
-
-with lib;
+{ stdenv, fetchFromGitHub, fetchpatch, python3, gettext, gobjectIntrospection, wrapGAppsHook, glibcLocales
+, gtk3, keybinder3, libnotify, libutempter, vte }:
 
 let
-  inherit (python2Packages) python;
-  inputs = [ dbus gtk2 gconf python libutempter vte keybinder gnome3.gnome-common ];
-  pyPath = makeSearchPathOutput "lib" python.sitePackages (attrVals [ "dbus-python" "notify" "pyGtkGlade" "pyxdg" ] python2Packages ++ [ gnome2.gnome_python ]);
- in stdenv.mkDerivation rec {
+  version = "3.1.0";
+in python3.pkgs.buildPythonApplication rec {
   name = "guake-${version}";
-  version = "0.8.3";
+  format = "other";
 
-  src = fetchurl {
-    url = "https://github.com/Guake/guake/archive/${version}.tar.gz";
-    sha256 = "1lbmdz3i9a97840h8239s360hd37nmhy3hs6kancxbzl1512ak1y";
+  src = fetchFromGitHub {
+    owner = "Guake";
+    repo = "guake";
+    rev = version;
+    sha256 = "0wyis7vxfhwrpq5r72c58k7hqzbk0f5ilm1zffcmbryvy11abgmx";
   };
 
-  nativeBuildInputs = [ pkgconfig libtool intltool makeWrapper ];
+  patches = [
+    # https://github.com/Guake/guake/issues/1264
+    (fetchpatch {
+      url = https://github.com/Guake/guake/commit/f289aa381bc5fffe83b1ba385c606a2e5cdc94a8.patch;
+      sha256 = "038niw44q14fs34nha1lz9vmxhf0l766ni8nsdxpid4crra2wjd3";
+    })
+  ];
 
-  buildInputs = inputs ++ (with python2Packages; [ pyGtkGlade pyxdg ]);
+  nativeBuildInputs = [ gettext gobjectIntrospection wrapGAppsHook python3.pkgs.pip glibcLocales ];
 
-  propagatedUserEnvPkgs = [ gconf.out ];
+  buildInputs = [ gtk3 keybinder3 libnotify python3 vte ];
 
-  patchPhase = ''
-    patchShebangs .
-  '';
+  propagatedBuildInputs = with python3.pkgs; [ dbus-python pbr pycairo pygobject3 ];
 
-  configureScript = "./autogen.sh";
+  LC_ALL = "en_US.UTF-8"; # fixes weird encoding error, see https://github.com/NixOS/nixpkgs/pull/38642#issuecomment-379727699
 
-  configureFlags = [
-    "--sysconfdir=/etc"
-    "--localstatedir=/var"
-    "--disable-schemas-install"
-  ];
+  PBR_VERSION = version; # pbr needs either .git directory, sdist, or env var
 
-  installFlags = [
-    # Configuring the installation to not install gconf schemas is not always supported,
-    # therefore gconftool-2 has this variable, which will make gconftool-2 not update any of the databases.
-    "GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1"
-    "sysconfdir=\${out}/etc"
-    "localstatedir=\${TMPDIR}"
+  makeFlags = [
+    "prefix=$(out)"
   ];
 
-  postInstall = ''
-    mkdir -p $out/share/gconf/schemas
-    cp data/guake.schemas $out/share/gconf/schemas
-  '';
-
-  postFixup = ''
-    for bin in $out/bin/{guake,guake-prefs}; do
-      substituteInPlace $bin \
-        --replace '/usr/bin/env python2' ${python.interpreter}
-      wrapProgram $bin \
-        --prefix XDG_DATA_DIRS : "$out/share:$XDG_ICON_DIRS:$GSETTINGS_SCHEMAS_PATH" \
-        --prefix LD_LIBRARY_PATH : ${makeLibraryPath inputs} \
-        --prefix PYTHONPATH : "$out/${python.sitePackages}:${pyPath}:$PYTHONPATH"
-    done
+  preFixup = ''
+    gappsWrapperArgs+=(--prefix LD_LIBRARY_PATH : "${stdenv.lib.makeLibraryPath [ libutempter ]}")
   '';
 
-  meta = {
+  meta = with stdenv.lib; {
     description = "Drop-down terminal for GNOME";
     homepage = http://guake-project.org;
     license = licenses.gpl2;