[-- Attachment #1: Type: text/plain, Size: 2 bytes --]
[-- Attachment #2: 0002-gnu-Add-gtksu.patch --]
[-- Type: application/octet-stream, Size: 2361 bytes --]
From 50743e3c242c3e5e10f5e144c72025610278c94d Mon Sep 17 00:00:00 2001
From: Raghav Gururajan <raghavgururajan@disroot.org>
Date: Mon, 27 Apr 2020 22:32:56 -0400
Subject: [PATCH 2/2] gnu: Add gtksu.
* gnu/packages/admin.scm (gtksu): New variable.
---
gnu/packages/admin.scm | 45 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 45 insertions(+)
diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm
index 9316e974bc..2db399ec38 100644
--- a/gnu/packages/admin.scm
+++ b/gnu/packages/admin.scm
@@ -130,6 +130,51 @@
#:use-module (gnu packages xml)
#:use-module (gnu packages xorg))
+(define-public gtksu
+ (package
+ (name "gtksu")
+ (version "0.1.6")
+ (source
+ (origin
+ (method git-fetch)
+ (uri
+ (git-reference
+ (url "https://github.com/KeithDHedger/GtkSu.git")
+ (commit (string-append name "-" version))))
+ (sha256
+ (base32 "1lrlyps1960294kcn3b0m86hdxr87hy3wmyjsjqwfb2rcrm0vvwg"))
+ (file-name (git-file-name name version))))
+ (build-system glib-or-gtk-build-system)
+ (arguments
+ `(#:configure-flags
+ ;; Creates ktsuss link that will refer to gtksu; so that some programs
+ ;; that hard code the files, think that ktsuss is being used.
+ (list "--enable-ktsuss-link")
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'patch-suwrap
+ (lambda* (#:key inputs #:allow-other-keys)
+ (substitute* "GtkSu/MakeSuWrap/suwrap.cpp"
+ (("/usr/bin/xauth")
+ (string-append (assoc-ref inputs "xauth") "/bin/xauth"))
+ (("/usr/X11R6/bin/xauth")
+ (string-append (assoc-ref inputs "xauth") "/bin/xauth")))
+ #t)))))
+ (native-inputs
+ `(("autoconf" ,autoconf)
+ ("automake" ,automake)
+ ("libtool" ,libtool)
+ ("pkg-config" ,pkg-config)))
+ (inputs
+ `(("glib" ,glib)
+ ("gtk+" ,gtk+-2)
+ ("xauth" ,xauth)))
+ (synopsis "Graphical front end for @command{su}")
+ (description "GtkSu is a simple replacement for gksu/ktsuss etc that allows
+you to run a program with different privileges ( root etc ).")
+ (home-page "https://github.com/KeithDHedger/GtkSu")
+ (license license:gpl3+)))
+
(define-public ktsuss
(package
(name "ktsuss")
--
2.26.2