From 210dc1a15fb7efb7dd8abc717dc3e1b1db77c8af Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Sun, 21 Aug 2022 02:00:01 +0200 Subject: [PATCH] gnu: cpupower: Modernise. * gnu/packages/linux.scm (cpupower)[arguments]: Rewrite as G-expressions. [native-inputs]: Remove input label. --- gnu/packages/linux.scm | 49 +++++++++++++++++++++--------------------- 1 file changed, 24 insertions(+), 25 deletions(-) diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm index 8b44392ac0..d2656abc18 100644 --- a/gnu/packages/linux.scm +++ b/gnu/packages/linux.scm @@ -6359,31 +6359,30 @@ (define-public cpupower (source (package-source linux-libre)) (build-system gnu-build-system) (arguments - '(#:phases (modify-phases %standard-phases - (add-after 'unpack 'enter-subdirectory - (lambda _ - (chdir "tools/power/cpupower") - #t)) - (delete 'configure) - (add-before 'build 'fix-makefiles - (lambda _ - (substitute* "Makefile" - (("/usr/") "/") - (("/bin/(install|pwd)" _ command) command)) - (substitute* "bench/Makefile" - (("\\$\\(CC\\) -o") "$(CC) $(LDFLAGS) -o")) - #t))) - #:make-flags (let ((out (assoc-ref %outputs "out"))) - (list (string-append "DESTDIR=" out) - (string-append "LDFLAGS=-Wl,-rpath=" out "/lib") - "libdir=/lib" - "docdir=/share/doc/cpupower" - "confdir=$(docdir)/examples" - ;; The Makefile recommends the following changes - "DEBUG=false" - "PACKAGE_BUGREPORT=bug-guix@gnu.org")) - #:tests? #f)) ;no tests - (native-inputs `(("gettext" ,gettext-minimal))) + (list #:make-flags + #~(list (string-append "DESTDIR=" #$output) + (string-append "LDFLAGS=-Wl,-rpath=" #$output "/lib") + "libdir=/lib" + "docdir=/share/doc/cpupower" + "confdir=$(docdir)/examples" + ;; The Makefile recommends the following changes + "DEBUG=false" + "PACKAGE_BUGREPORT=bug-guix@gnu.org") + #:tests? #f ; no tests + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'enter-subdirectory + (lambda _ + (chdir "tools/power/cpupower"))) + (delete 'configure) ; no configure script + (add-before 'build 'fix-makefiles + (lambda _ + (substitute* "Makefile" + (("/usr/") "/") + (("/bin/(install|pwd)" _ command) command)) + (substitute* "bench/Makefile" + (("\\$\\(CC\\) -o") "$(CC) $(LDFLAGS) -o"))))))) + (native-inputs (list gettext-minimal)) (inputs (list pciutils)) (home-page (package-home-page linux-libre)) (synopsis "CPU frequency and voltage scaling tools for Linux")