diff options
author | aurtzy <aurtzy@gmail.com> | 2025-05-07 01:59:08 -0400 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2025-06-12 14:38:16 +0200 |
commit | 856bfa268fade10ab8a53e8fc0ce0daa22e76107 (patch) | |
tree | 942de37fa4d6c52703a992069b40e62bac9137f4 | |
parent | 82748f595f611c772cf19d7c151e4ae47c026dfb (diff) |
gnu: stb: Use modern package style.
* gnu/packages/stb.scm (stb)[arguments]<#:phases>: Use G-Expressions.
(make-stb-header-package): Likewise.
Change-Id: I836ad872e20444dcfb30480bd420cb63e4bb313f
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
-rw-r--r-- | gnu/packages/stb.scm | 56 |
1 files 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 <mbakke@fastmail.com> ;;; Copyright © 2020 Tobias Geerinckx-Rice <me@tobias.gr> +;;; Copyright © 2025 aurtzy <aurtzy@gmail.com> ;;; ;;; This file is part of GNU Guix. ;;; @@ -18,6 +19,7 @@ ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. (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 |