summary refs log tree commit diff
path: root/pkgs/applications/misc/gksu/default.nix
blob: bfa504477616858694f1373f11447082ddb8a8e7 (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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
{ stdenv, fetchurl, pkgconfig, gtk2, gnome2, gnome3, libgksu,
  intltool, libstartup_notification, gtk-doc, wrapGAppsHook
}:

stdenv.mkDerivation rec {
  version = "2.0.2";
  pname = "gksu";

  src = fetchurl {
    url = "http://people.debian.org/~kov/gksu/${pname}-${version}.tar.gz";
    sha256 = "0npfanlh28daapkg25q4fncxd89rjhvid5fwzjaw324x0g53vpm1";
  };

  nativeBuildInputs = [
    pkgconfig intltool gtk-doc wrapGAppsHook
  ];

  buildInputs = [
    gtk2 gnome2.GConf libstartup_notification gnome3.libgnome-keyring
  ];

  propagatedBuildInputs = [
    libgksu
  ];

  hardeningDisable = [ "format" ];

  patches = [
    # https://savannah.nongnu.org/bugs/index.php?36127
    ./gksu-2.0.2-glib-2.31.patch
  ];

  postPatch = ''
    sed -i -e 's|/usr/bin/x-terminal-emulator|-l gnome-terminal|g' gksu.desktop
  '';

  configureFlags = [ "--disable-nautilus-extension" ];

  meta = {
    description = "A graphical frontend for libgksu";
    longDescription = ''
      GKSu is a library that provides a GTK frontend to su and sudo.
      It supports login shells and preserving environment when acting as
      a su frontend. It is useful to menu items or other graphical
      programs that need to ask a user's password to run another program
      as another user.
    '';
    homepage = "https://www.nongnu.org/gksu/";
    license = stdenv.lib.licenses.gpl2;
    maintainers = [ stdenv.lib.maintainers.romildo ];
    platforms = stdenv.lib.platforms.linux;
  };
}