all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Nicolas Goaziou <mail@nicolasgoaziou.fr>
To: 51986@debbugs.gnu.org
Subject: [bug#51986] [PATCH] Add tlpui
Date: Fri, 19 Nov 2021 22:36:29 +0100	[thread overview]
Message-ID: <87czmvygiq.fsf@nicolasgoaziou.fr> (raw)

[-- Attachment #1: Type: text/plain, Size: 85 bytes --]

Hello,

The following patch adds TLPUI to "linux.scm".

Regards,
-- 
Nicolas Goaziou

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Add TLPUI --]
[-- Type: text/x-diff, Size: 3138 bytes --]

From 701601c421713157c13f6fd2c649b7e69fc079fd Mon Sep 17 00:00:00 2001
Message-Id: <701601c421713157c13f6fd2c649b7e69fc079fd.1637357746.git.mail@nicolasgoaziou.fr>
From: Nicolas Goaziou <mail@nicolasgoaziou.fr>
Date: Fri, 19 Nov 2021 22:35:25 +0100
Subject: [PATCH] gnu: Add tlpui.

* gnu/packages/linux.scm (tlpui): New variable.
---
 gnu/packages/linux.scm | 55 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 55 insertions(+)

diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index 1d005de1db..17a702c73e 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -6874,6 +6874,61 @@ (define-public tlp
     ;; rest is GPLv2+.
     (license (list license:gpl2+ license:gpl3+))))
 
+(define-public tlpui
+  (package
+    (name "tlpui")
+    (version "1.4.0")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/d4nj1/TLPUI")
+             (commit (string-append "tlpui-" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "1sd380inkiq8mljnzjd8p69a6cnwv19v2793358v3ws1mr55x127"))))
+    (build-system python-build-system)
+    (arguments
+     `(#:tests? #false
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'patch-setup.py
+           ;; Install data_files to $out/share instead of /usr/share.
+           (lambda _
+             (substitute* "setup.py"
+               (("/usr/") ""))))
+         (add-after 'unpack 'use-tlp-input
+           ;; Hard-code tlp-stat filename to avoid propagating "tlp".
+           (lambda* (#:key inputs #:allow-other-keys)
+             (let ((tlp-stat (string-append (assoc-ref inputs "tlp")
+                                            "/bin/tlp-stat")))
+               (substitute* '("tlpui/file.py"
+                              "tlpui/settingshelper.py"
+                              "tlpui/statui.py")
+                 (("which\\(\"tlp-stat\"\\)") (string-append "'" tlp-stat "'"))
+                 (("\"tlp-stat\"") (string-append "'" tlp-stat "'"))))))
+         (add-after 'install 'wrap-gi-python
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (let ((out (assoc-ref outputs "out"))
+                   (gi-typelib-path (getenv "GI_TYPELIB_PATH")))
+               (wrap-program (string-append out "/bin/tlpui")
+                 `("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path)))))))))
+    (native-inputs
+     `(("glib:bin" ,glib "bin")
+       ("gobject-introspection" ,gobject-introspection)))
+    (inputs
+     `(("gtk+" ,gtk+)
+       ("python-pygobject" ,python-pygobject)
+       ("tlp" ,tlp)))
+    (home-page "https://github.com/d4nj1/TLPUI")
+    (synopsis "User interface for TLP written in Python")
+    (description
+     "The Python scripts in this project generate a GTK-UI to change
+TLP configuration files easily.  It has the aim to protect users from
+setting bad configuration and to deliver a basic overview of all the
+valid configuration values.")
+    (license license:gpl2+)))
+
 (define-public lshw
   (package
     (name "lshw")
-- 
2.34.0


             reply	other threads:[~2021-11-19 21:37 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-19 21:36 Nicolas Goaziou [this message]
2021-11-25 12:38 ` [bug#51986] [PATCH] Add tlpui Mathieu Othacehe
2021-11-26  8:36   ` Nicolas Goaziou
2021-12-21 21:25 ` bug#51986: " Nicolas Goaziou

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87czmvygiq.fsf@nicolasgoaziou.fr \
    --to=mail@nicolasgoaziou.fr \
    --cc=51986@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.