gnu: tlpui: Use G-expressions.
* gnu/packages/linux.scm (tlpui)[arguments]: Use G-expressions.
This commit is contained in:
parent
16c2372fe8
commit
f5758b36da
1 changed files with 37 additions and 37 deletions
|
@ -7150,43 +7150,43 @@ every time the power supply source is changed.")
|
||||||
(base32 "16a6x733szsggn23ns7bj3gpvb80675plh96v4llrz0s8p3h47pg"))))
|
(base32 "16a6x733szsggn23ns7bj3gpvb80675plh96v4llrz0s8p3h47pg"))))
|
||||||
(build-system python-build-system)
|
(build-system python-build-system)
|
||||||
(arguments
|
(arguments
|
||||||
`(#:phases
|
(list
|
||||||
(modify-phases %standard-phases
|
#:phases
|
||||||
(add-after 'unpack 'patch-setup.py
|
#~(modify-phases %standard-phases
|
||||||
;; Install data_files to $out/share instead of /usr/share.
|
(add-after 'unpack 'patch-setup.py
|
||||||
(lambda _
|
;; Install data_files to $out/share instead of /usr/share.
|
||||||
(substitute* "setup.py"
|
(lambda _
|
||||||
(("/usr/") ""))))
|
(substitute* "setup.py"
|
||||||
(add-after 'unpack 'use-tlp-input
|
(("/usr/") ""))))
|
||||||
;; Hard-code tlp-stat filename to avoid propagating "tlp".
|
(add-after 'unpack 'use-tlp-input
|
||||||
(lambda* (#:key inputs #:allow-other-keys)
|
;; Hard-code tlp-stat filename to avoid propagating "tlp".
|
||||||
(let ((tlp-stat (search-input-file inputs "/bin/tlp-stat")))
|
(lambda* (#:key inputs #:allow-other-keys)
|
||||||
(with-directory-excursion "tlpui"
|
(let ((tlp-stat (search-input-file inputs "/bin/tlp-stat")))
|
||||||
(substitute* '("file.py" "settingshelper.py" "statui.py")
|
(with-directory-excursion "tlpui"
|
||||||
(("which\\(\"tlp-stat\"\\)")
|
(substitute* '("file.py" "settingshelper.py" "statui.py")
|
||||||
(string-append "'" tlp-stat "'"))
|
(("which\\(\"tlp-stat\"\\)")
|
||||||
(("\"tlp-stat\"")
|
(string-append "'" tlp-stat "'"))
|
||||||
(string-append "'" tlp-stat "'")))))))
|
(("\"tlp-stat\"")
|
||||||
(add-before 'check 'fix-home-directory
|
(string-append "'" tlp-stat "'")))))))
|
||||||
(lambda _
|
(add-before 'check 'fix-home-directory
|
||||||
;; Tests fail with "Permission denied:
|
(lambda _
|
||||||
;; '/homeless-shelter'".
|
;; Tests fail with "Permission denied:
|
||||||
(setenv "HOME" "/tmp")))
|
;; '/homeless-shelter'".
|
||||||
;; `sanity-check' phase errors out with the following
|
(setenv "HOME" "/tmp")))
|
||||||
;; messages: "Unable to init server: Could not connect:
|
;; `sanity-check' phase errors out with the following
|
||||||
;; Connection refused" and "Error: cannot read user
|
;; messages: "Unable to init server: Could not connect:
|
||||||
;; configuration from /etc/tlp.conf or /etc/default/tlp".
|
;; Connection refused" and "Error: cannot read user
|
||||||
(delete 'sanity-check)
|
;; configuration from /etc/tlp.conf or /etc/default/tlp".
|
||||||
(replace 'check
|
(delete 'sanity-check)
|
||||||
(lambda* (#:key tests? #:allow-other-keys)
|
(replace 'check
|
||||||
(when tests?
|
(lambda* (#:key tests? #:allow-other-keys)
|
||||||
(invoke "python" "-m" "discover"))))
|
(when tests?
|
||||||
(add-after 'install 'wrap-gi-python
|
(invoke "python" "-m" "discover"))))
|
||||||
(lambda* (#:key outputs #:allow-other-keys)
|
(add-after 'install 'wrap-gi-python
|
||||||
(let ((out (assoc-ref outputs "out"))
|
(lambda _
|
||||||
(gi-typelib-path (getenv "GI_TYPELIB_PATH")))
|
(let ((gi-typelib-path (getenv "GI_TYPELIB_PATH")))
|
||||||
(wrap-program (string-append out "/bin/tlpui")
|
(wrap-program (string-append #$output "/bin/tlpui")
|
||||||
`("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path)))))))))
|
`("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path)))))))))
|
||||||
(native-inputs
|
(native-inputs
|
||||||
(list `(,glib "bin") gobject-introspection python-discover))
|
(list `(,glib "bin") gobject-introspection python-discover))
|
||||||
(inputs
|
(inputs
|
||||||
|
|
Reference in a new issue