summary refs log tree commit diff
diff options
context:
space:
mode:
authorMatthijs Steen <emailmatthijs@gmail.com>2015-11-15 00:16:52 +0100
committerVladimír Čunát <vcunat@gmail.com>2016-01-20 19:33:48 +0100
commit7f58e162bc60daf51961fda6f5e721dde529539b (patch)
tree3e80c9803bb8c18659a5f0c5ff4c4387ce160e41
parente6cc519856066a6be44f28e3efdc100aade2e2f0 (diff)
downloadnixpkgs-7f58e162bc60daf51961fda6f5e721dde529539b.tar
nixpkgs-7f58e162bc60daf51961fda6f5e721dde529539b.tar.gz
nixpkgs-7f58e162bc60daf51961fda6f5e721dde529539b.tar.bz2
nixpkgs-7f58e162bc60daf51961fda6f5e721dde529539b.tar.lz
nixpkgs-7f58e162bc60daf51961fda6f5e721dde529539b.tar.xz
nixpkgs-7f58e162bc60daf51961fda6f5e721dde529539b.tar.zst
nixpkgs-7f58e162bc60daf51961fda6f5e721dde529539b.zip
guake: init at 0.8.3 (close #11027)
There's a catch noted at the top of the expression.
(vcunat moved it there from the commit message)
-rw-r--r--pkgs/applications/misc/guake/default.nix77
-rw-r--r--pkgs/development/libraries/libutempter/default.nix29
-rw-r--r--pkgs/top-level/all-packages.nix7
3 files changed, 113 insertions, 0 deletions
diff --git a/pkgs/applications/misc/guake/default.nix b/pkgs/applications/misc/guake/default.nix
new file mode 100644
index 00000000000..4f6733e7d8d
--- /dev/null
+++ b/pkgs/applications/misc/guake/default.nix
@@ -0,0 +1,77 @@
+/* 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, python2, python2Packages, libutempter, vte, keybinder, gnome2, gnome3 }:
+
+with lib;
+
+let inputs = [ dbus gtk2 gconf python2 libutempter vte keybinder gnome3.gnome_common ];
+    pySubDir = "lib/${python2.libPrefix}/site-packages";
+    pyPath = makeSearchPath pySubDir (attrVals [ "dbus" "notify" "pyGtkGlade" "pyxdg" ] python2Packages ++ [ gnome2.gnome_python ]);
+ in stdenv.mkDerivation rec {
+  name = "guake-${version}";
+  version = "0.8.3";
+
+  src = fetchurl {
+    url = "https://github.com/Guake/guake/archive/${version}.tar.gz";
+    sha256 = "1lbmdz3i9a97840h8239s360hd37nmhy3hs6kancxbzl1512ak1y";
+  };
+
+  nativeBuildInputs = [ pkgconfig libtool intltool makeWrapper ];
+
+  buildInputs = inputs ++ (with python2Packages; [ pyGtkGlade pyxdg ]);
+
+  patchPhase = ''
+    patchShebangs .
+  '';
+
+  configureScript = "./autogen.sh";
+
+  configureFlags = [
+    "--sysconfdir=/etc"
+    "--localstatedir=/var"
+    "--disable-schemas-install"
+  ];
+
+  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}"
+  ];
+
+  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' ${python2}/bin/python2
+      wrapProgram $bin \
+        --prefix XDG_DATA_DIRS : "$out/share:$XDG_ICON_DIRS:$GSETTINGS_SCHEMAS_PATH" \
+        --prefix LD_LIBRARY_PATH : ${makeLibraryPath inputs} \
+        --prefix PYTHONPATH : "$out/${pySubDir}:${pyPath}:$PYTHONPATH"
+    done
+  '';
+
+  meta = {
+    description = "Drop-down terminal for GNOME";
+    homepage = http://guake-project.org;
+    license = licenses.gpl2;
+    platforms = platforms.linux;
+    maintainers = [ maintainers.msteen ];
+  };
+}
diff --git a/pkgs/development/libraries/libutempter/default.nix b/pkgs/development/libraries/libutempter/default.nix
new file mode 100644
index 00000000000..8481f857b2c
--- /dev/null
+++ b/pkgs/development/libraries/libutempter/default.nix
@@ -0,0 +1,29 @@
+{ stdenv, fetchurl, lib, glib }:
+
+with lib;
+
+stdenv.mkDerivation rec {
+  name = "libutempter-${version}";
+  version = "1.1.6";
+
+  src = fetchurl {
+    url = "http://archive.ubuntu.com/ubuntu/pool/main/libu/libutempter/libutempter_${version}.orig.tar.bz2";
+    sha256 = "15y3xbgznjxnfmix4xg3bwmqdvghdw7slbhazb0ybmyf65gmd65q";
+  };
+
+  buildInputs = [ glib ];
+
+  installFlags = [
+    "libdir=\${out}/lib"
+    "libexecdir=\${out}/lib"
+    "includedir=\${out}/include"
+    "mandir=\${out}/share/man"
+  ];
+
+  meta = {
+    description = "Interface for terminal emulators such as screen and xterm to record user sessions to utmp and wtmp files";
+    license = licenses.lgpl21Plus;
+    platforms = platforms.linux;
+    maintainers = [ maintainers.msteen ];
+  };
+}
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 91f74bc3056..b1e7d5efc95 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -7689,6 +7689,8 @@ let
 
   libusbmuxd = callPackage ../development/libraries/libusbmuxd { };
 
+  libutempter = callPackage ../development/libraries/libutempter { };
+
   libunwind = if stdenv.isDarwin
     then darwin.libunwind
     else callPackage ../development/libraries/libunwind { };
@@ -12117,6 +12119,11 @@ let
     inherit (gnome2) gtk;
   };
 
+  guake = callPackage ../applications/misc/guake {
+    gconf = gnome.GConf;
+    vte = gnome.vte.override { pythonSupport = true; };
+  };
+
   guitone = callPackage ../applications/version-management/guitone {
     graphviz = graphviz_2_32;
   };