gnu: thinkfan: Use G-expressions.

* gnu/packages/linux.scm (thinkfan)[arguments]<#:configure-flags, #:phases>:
Use G-expressions.
This commit is contained in:
Nicolas Goaziou 2022-02-08 00:51:48 +01:00
parent 70b76c47b0
commit cd6879cf97
No known key found for this signature in database
GPG key ID: DA00B4F048E92F2D

View file

@ -5909,34 +5909,32 @@ feature, and a laptop with an accelerometer. It has no effect on SSDs.")
(base32 "07l7cxbsyvy7awa1zk0zxng60749idvsx3535iginhkqxfzij4b9")))) (base32 "07l7cxbsyvy7awa1zk0zxng60749idvsx3535iginhkqxfzij4b9"))))
(build-system cmake-build-system) (build-system cmake-build-system)
(arguments (arguments
`(#:modules ((guix build cmake-build-system) (list
#:modules '((guix build cmake-build-system)
(guix build utils) (guix build utils)
(srfi srfi-26)) (srfi srfi-26))
#:tests? #f ; no test target #:tests? #f ; no test target
#:configure-flags #:configure-flags
;; Enable reading temperatures from hard disks via S.M.A.R.T. ;; Enable reading temperatures from hard disks via S.M.A.R.T.
;; Upstream defaults to OFF because libatasmart seems to be horribly ;; Upstream defaults to OFF because libatasmart seems to be horribly
;; inefficient. ;; inefficient.
`("-DUSE_ATASMART:BOOL=ON") #~(list "-DUSE_ATASMART:BOOL=ON")
#:phases #:phases
(modify-phases %standard-phases #~(modify-phases %standard-phases
(add-after 'unpack 'create-init-scripts (add-after 'unpack 'create-init-scripts
;; CMakeLists.txt relies on build-time symptoms of OpenRC and ;; CMakeLists.txt relies on build-time symptoms of OpenRC and
;; systemd to patch and install their service files. Fake their ;; systemd to patch and install their service files. Fake their
;; presence rather than duplicating the build system below. Leave ;; presence rather than duplicating the build system below. Leave
;; things like /bin/kill because they're not worth a dependency. ;; things like /bin/kill because they're not worth a dependency.
;; The sysvinit needs manual patching, but since upstream doesn't ;; The sysvinit needs manual patching, but since upstream doesn't
;; even provide the option to install it: don't. ;; even provide the option to install it: don't.
(lambda* (#:key outputs #:allow-other-keys) (lambda _
(let* ((out (assoc-ref outputs "out")) (substitute* "CMakeLists.txt"
(share (string-append out "/share/" ,name))) (("pkg_check_modules\\((OPENRC|SYSTEMD) .*" _ package)
(substitute* "CMakeLists.txt" (format #f "option(~a_FOUND \"Faked\" ON)\n" package))
(("pkg_check_modules\\((OPENRC|SYSTEMD) .*" _ package) ;; That was easy! Now we just need to fix the destinations.
(format #f "option(~a_FOUND \"Faked\" ON)\n" package)) (("/etc" directory)
;; That was easy! Now we just need to fix the destinations. (string-append #$output directory))))))))
(("/etc" directory)
(string-append out directory)))
#t))))))
(native-inputs (native-inputs
(list pkg-config)) (list pkg-config))
(inputs (inputs