nonguix-mirrors/nonguix/utils.scm
Jonathan Brielmaier 62a5df4222
*.scm: Use SPDX license identifiers.
Fixes https://gitlab.com/nonguix/nonguix/-/issues/224

* *.scm: Use SPDX license identifier and remove obsolete license
statement.
2022-12-19 17:17:39 +01:00

23 lines
751 B
Scheme

;;; SPDX-License-Identifier: GPL-3.0-or-later
;;; Copyright © 2019 Pierre Neidhardt <mail@ambrevar.xyz>
(define-module (nonguix utils)
#:use-module (srfi srfi-26)
#:use-module (ice-9 match)
#:use-module (ice-9 textual-ports)
#:use-module (ice-9 popen)
#:use-module (guix utils)
#:use-module (guix packages))
(define-public (to32 package64)
"Build package for i686-linux.
Only x86_64-linux and i686-linux are supported.
- If i686-linux, return the package unchanged.
- If x86_64-linux, return the 32-bit version of the package."
(match (%current-system)
("x86_64-linux"
(package
(inherit package64)
(arguments `(#:system "i686-linux"
,@(package-arguments package64)))))
(_ package64)))