From 908a3f361480f39819c712d62a5e0b685e823c54 Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Tue, 5 Mar 2019 16:56:41 +0100 Subject: gnu: thinkfan: Let the build system handle rcscripts/. This moves them from /share/thinkfan to their conventional locations in /etc and /lib; the former was an arbitrary Guixism anyway. * gnu/packages/linux.scm (thinkfan)[arguments]: Re-write 'install-rc-scripts' as 'create-init-scripts' and move it after the 'unpack' phase. --- gnu/packages/linux.scm | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) (limited to 'gnu/packages/linux.scm') diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm index 9f83f97cef..dd9e19aa37 100644 --- a/gnu/packages/linux.scm +++ b/gnu/packages/linux.scm @@ -3507,19 +3507,23 @@ feature, and a laptop with an accelerometer. It has no effect on SSDs.") `("-DUSE_ATASMART:BOOL=ON") #:phases (modify-phases %standard-phases - ;; Install scripts for various foreign init systems. Also fix - ;; hard-coded path for daemon. - (add-after 'install 'install-rc-scripts + (add-after 'unpack 'create-init-scripts + ;; CMakeLists.txt relies on build-time symptoms of OpenRC and + ;; systemd to patch and install their service files. Fake their + ;; presence rather than duplicating the build system below. Leave + ;; things like ‘/bin/kill’ because they're not worth a dependency. + ;; The sysvinit needs manual patching, but since upstream doesn't + ;; even provide the option to install it: don't. (lambda* (#:key outputs #:allow-other-keys) - (let ((out (assoc-ref outputs "out")) - (files (find-files "../source/rcscripts" ".*"))) - (substitute* files - (("/usr/sbin/(\\$NAME|thinkfan)" _ name) - (string-append out "/sbin/" name))) - (for-each (cute install-file <> - (string-append out "/share/thinkfan")) - files)) - #t))))) + (let* ((out (assoc-ref outputs "out")) + (share (string-append out "/share/" ,name))) + (substitute* "CMakeLists.txt" + (("pkg_check_modules\\((OPENRC|SYSTEMD) .*" _ package) + (format "option(~a_FOUND \"Faked\" ON)\n" package)) + ;; That was easy! Now we just need to fix the destinations. + (("/etc" directory) + (string-append out directory))) + #t)))))) (native-inputs `(("pkg-config" ,pkg-config))) (inputs -- cgit v1.2.3 h>Author 022-11-15installer: Report known-unsupported PCI devices....Ludovic Courtès 2022-11-15installer: Error page width is parameterized....Ludovic Courtès 2022-11-15installer: Warn about hardware support after the welcome page....Ludovic Courtès 2022-11-02installer: Skip the backtrace page on user abort....Mathieu Othacehe 2022-11-02installer: Add core dump support....Mathieu Othacehe 2022-10-25installer: welcome: Warn when uvesafb gets used....pelzflorian (Florian Pelz) 2022-10-20installer: Add a missing confirmation page before formatting....Mathieu Othacehe 2022-10-20installer: Propose the user to report a "guix system init" failure....Mathieu Othacehe 2022-10-17installer: Factorize url-alive? in internet check....Andrew Tropin 2022-10-17installer: Relax internet check availability criteria....aleksandr barakin 2022-10-17guix: Fix typos....Julien Lepiller 2022-10-13installer: partition: Add a confirmation page before formatting....Mathieu Othacehe 2022-09-22installer: Exit console-services page with abort-to-prompt....Josselin Poiret 2022-09-22installer: Return partitions with crypt password as step result....Josselin Poiret 2022-09-22installer: Move <secret> to utils and use it for crypt passwords....Josselin Poiret 2022-04-06installer: user: Forbid root user creation....Mathieu Othacehe 2022-02-02installer: Make dump archive creation optional and selective....Josselin Poiret 2022-02-02installer: Turn passwords into opaque records....Josselin Poiret 2022-02-02installer: Add error page when running external commands....Josselin Poiret 2022-02-02installer: Use named prompt to abort or break installer steps....Josselin Poiret 2022-02-02installer: Replace run-command by invoke in newt/page.scm....Josselin Poiret 2022-02-02installer: Fix run-file-textbox-page when edit-button is #f....Josselin Poiret 2022-02-02installer: Use new installer-log-line everywhere....Josselin Poiret 2022-02-02installer: Add crash dump upload support....Mathieu Othacehe 2022-01-14installer: Check if ci.guix.gnu.org can be reached....Mathieu Othacehe 2022-01-14installer: Ignore small devices....Mathieu Othacehe 2021-12-28installer: Recommend 'ntp-service-type' for non-graphical systems....Leo Famulari 2021-12-28installer: Offer the CUPS printing service on a dedicated page....Leo Famulari