From 856bfa268fade10ab8a53e8fc0ce0daa22e76107 Mon Sep 17 00:00:00 2001 From: aurtzy Date: Wed, 7 May 2025 01:59:08 -0400 Subject: [PATCH] gnu: stb: Use modern package style. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/stb.scm (stb)[arguments]<#:phases>: Use G-Expressions. (make-stb-header-package): Likewise. Change-Id: I836ad872e20444dcfb30480bd420cb63e4bb313f Signed-off-by: Ludovic Courtès --- gnu/packages/stb.scm | 56 ++++++++++++++++++++++++-------------------- 1 file changed, 31 insertions(+), 25 deletions(-) diff --git a/gnu/packages/stb.scm b/gnu/packages/stb.scm index 90c9fff8cf..64375e7480 100644 --- a/gnu/packages/stb.scm +++ b/gnu/packages/stb.scm @@ -1,6 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2018 Marius Bakke ;;; Copyright © 2020 Tobias Geerinckx-Rice +;;; Copyright © 2025 aurtzy ;;; ;;; This file is part of GNU Guix. ;;; @@ -18,6 +19,7 @@ ;;; along with GNU Guix. If not, see . (define-module (gnu packages stb) + #:use-module (guix gexp) #:use-module (guix packages) #:use-module (guix git-download) #:use-module (guix build-system gnu) @@ -44,25 +46,27 @@ (file-name (git-file-name name version)))) (build-system gnu-build-system) (arguments - `(#:modules ((ice-9 ftw) + (list + #:modules `((ice-9 ftw) (ice-9 regex) (srfi srfi-26) ,@%default-gnu-modules) - #:phases (modify-phases %standard-phases - (delete 'configure) - (delete 'build) - (replace 'check - (lambda _ - #f ; (invoke "make" "-C" "tests" "CC=gcc") - )) - (replace 'install - (lambda* (#:key outputs #:allow-other-keys) - (let ((out (assoc-ref outputs "out")) - (files (make-regexp "\\.(c|h|md)$"))) - (for-each (lambda (file) - (install-file file out)) - (scandir "." (cut regexp-exec files <>))) - #t)))))) + #:phases + #~(modify-phases %standard-phases + (delete 'configure) + (delete 'build) + (replace 'check + (lambda _ + #f ; (invoke "make" "-C" "tests" "CC=gcc") + )) + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out")) + (files (make-regexp "\\.(c|h|md)$"))) + (for-each (lambda (file) + (install-file file out)) + (scandir "." (cut regexp-exec files <>))) + #t)))))) (synopsis "Single file libraries for C/C++") (description "This package contains a variety of small independent libraries for @@ -79,15 +83,17 @@ the C programming language.") (inputs (list stb)) (build-system trivial-build-system) (arguments - `(#:modules ((guix build utils)) - #:builder (begin - (use-modules (guix build utils)) - (let ((stb (assoc-ref %build-inputs "stb")) - (lib (string-join (string-split ,name #\-) "_")) - (out (assoc-ref %outputs "out"))) - (install-file (string-append stb "/" lib ".h") - (string-append out "/include")) - #t)))) + (list + #:modules '((guix build utils)) + #:builder + #~(begin + (use-modules (guix build utils)) + (let ((stb #$(this-package-input "stb")) + (lib (string-join (string-split #$name #\-) "_")) + (out #$output)) + (install-file (string-append stb "/" lib ".h") + (string-append out "/include")) + #t)))) (description description))) ;; TODO: These descriptions are not translatable! They should be