Subject: gnu: ktsuss: Fix paths.

From: Raghav Gururajan <[email-masked]>
Date: Mon, 27 Apr 2020 09:37:02 -0400

From ecdb9f73f2aa9854f03ace199fcc4c4547a2be49 Mon Sep 17 00:00:00 2001
From: Raghav Gururajan <[email-masked]>
Date: Mon, 27 Apr 2020 09:32:43 -0400
Subject: [PATCH] gnu: ktsuss: Fix paths.

* gnu/packages/admin.scm (ktsuss): Fix paths.
---
 gnu/packages/admin.scm | 17 +++++++++--------
 1 file changed, 9 insertions(+), 8 deletions(-)

diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm
index 236eebe53c..9316e974bc 100644
--- a/gnu/packages/admin.scm
+++ b/gnu/packages/admin.scm
@@ -150,24 +150,25 @@
        (list "--enable-sudo=yes")
        #:phases
        (modify-phases %standard-phases
-         (add-after 'unpack 'patch-sudo-path
-           (lambda* (#:key inputs #:allow-other-keys)
+         (add-after 'unpack 'patch-paths
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (substitute* "src/ktsuss.c"
+               (("/usr/sbin:/usr/local/sbin:/sbin")
+                "~/.guix-profile/sbin"))
              (substitute* "configure.ac"
+               (("supath=`which su 2>/dev/null`")
+                "supath=/run/setuid-programs/su")
                (("sudopath=`which sudo 2>/dev/null`")
-                (string-append "sudopath="
-                               (string-append (assoc-ref inputs "sudo")
-                                              "/bin/sudo"))))
+                "sudopath=/run/setuid-programs/sudo"))
              #t)))))
     (native-inputs
      `(("autoconf" ,autoconf)
-       ("autogen" ,autogen)
        ("automake" ,automake)
        ("libtool" ,libtool)
        ("pkg-config" ,pkg-config)))
     (inputs
      `(("glib" ,glib)
-       ("gtk+" ,gtk+-2)
-       ("sudo" ,sudo)))
+       ("gtk+" ,gtk+-2)))
     (synopsis "Graphical front end for @command{su}")
     (description
      "Ktsuss stands for ``Keep the @command{su} simple, stupid''.
-- 
2.26.2