[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
03/07: Move 'nix-system->gnu-triplet' to (guix utils) and export it.
From: |
Mark H. Weaver |
Subject: |
03/07: Move 'nix-system->gnu-triplet' to (guix utils) and export it. |
Date: |
Wed, 31 Dec 2014 22:44:03 +0000 |
mhw pushed a commit to branch wip-armhf
in repository guix.
commit 09f18f248a91c5482741f9924072247de5d21d3a
Author: Mark H Weaver <address@hidden>
Date: Wed Dec 31 03:47:40 2014 -0500
Move 'nix-system->gnu-triplet' to (guix utils) and export it.
* gnu/packages/commencement.scm (nix-system->gnu-triplet): Move to...
* guix/utils.scm (nix-system->gnu-triplet): ... here. Fix docstring typo.
---
gnu/packages/commencement.scm | 13 -------------
guix/utils.scm | 14 ++++++++++++++
2 files changed, 14 insertions(+), 13 deletions(-)
diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm
index 20831de..e6d03b1 100644
--- a/gnu/packages/commencement.scm
+++ b/gnu/packages/commencement.scm
@@ -122,19 +122,6 @@
("file" ,file-boot0)
,@%bootstrap-inputs))
-(define* (nix-system->gnu-triplet
- #:optional (system (%current-system)) (vendor "unknown"))
- "Return an a guess of the GNU triplet corresponding to Nix system
-identifier SYSTEM."
- (let* ((dash (string-index system #\-))
- (arch (substring system 0 dash))
- (os (substring system (+ 1 dash))))
- (string-append arch
- "-" vendor "-"
- (if (string=? os "linux")
- "linux-gnu"
- os))))
-
(define* (boot-triplet #:optional (system (%current-system)))
;; Return the triplet used to create the cross toolchain needed in the
;; first bootstrapping stage.
diff --git a/guix/utils.scm b/guix/utils.scm
index d0d2e8a..7ac586b 100644
--- a/guix/utils.scm
+++ b/guix/utils.scm
@@ -61,6 +61,7 @@
location-column
source-properties->location
+ nix-system->gnu-triplet
gnu-triplet->nix-system
%current-system
%current-target-system
@@ -476,6 +477,19 @@ previous value of the keyword argument."
(()
(reverse before)))))))
+(define* (nix-system->gnu-triplet
+ #:optional (system (%current-system)) (vendor "unknown"))
+ "Return a guess of the GNU triplet corresponding to Nix system
+identifier SYSTEM."
+ (let* ((dash (string-index system #\-))
+ (arch (substring system 0 dash))
+ (os (substring system (+ 1 dash))))
+ (string-append arch
+ "-" vendor "-"
+ (if (string=? os "linux")
+ "linux-gnu"
+ os))))
+
(define (gnu-triplet->nix-system triplet)
"Return the Nix system type corresponding to TRIPLET, a GNU triplet as
returned by `config.guess'."
- 01/07: gnu: bootstrap: Add support for snippets to 'package-from-tarball'., (continued)
- 01/07: gnu: bootstrap: Add support for snippets to 'package-from-tarball'., Mark H. Weaver, 2014/12/31
- 02/07: gnu: bootstrap: Fix egrep and fgrep after unpacking bootstrap binaries., Mark H. Weaver, 2014/12/31
- 04/07: gnu: gcc: Use 'gcc-configure-flags-for-triplet' for native builds., Mark H. Weaver, 2014/12/31
- 03/07: Move 'nix-system->gnu-triplet' to (guix utils) and export it., Mark H. Weaver, 2014/12/31
- 05/07: gnu: gmp: Apply fixes for armhf., Mark H. Weaver, 2014/12/31
- 06/07: gnu: guile: Apply fixes for arm., Mark H. Weaver, 2014/12/31
- 07/07: PRELIMINARY: gnu: Add support for 'armhf-linux' system., Mark H. Weaver, 2014/12/31
- branch wip-armhf created (now 22b6511), Mark H. Weaver, 2014/12/31
- 01/07: gnu: bootstrap: Add support for snippets to 'package-from-tarball'., Mark H. Weaver, 2014/12/31
- 02/07: gnu: bootstrap: Fix egrep and fgrep after unpacking bootstrap binaries., Mark H. Weaver, 2014/12/31
- 03/07: Move 'nix-system->gnu-triplet' to (guix utils) and export it.,
Mark H. Weaver <=
- 04/07: gnu: gcc: Use 'gcc-configure-flags-for-triplet' for native builds., Mark H. Weaver, 2014/12/31
- 05/07: gnu: gmp: Apply fixes for armhf., Mark H. Weaver, 2014/12/31
- 06/07: gnu: guile: Apply fixes for arm., Mark H. Weaver, 2014/12/31
- 07/07: PRELIMINARY: gnu: Add support for 'armhf-linux' system., Mark H. Weaver, 2014/12/31