@@ -77,6 +77,7 @@
;;; Copyright © 2023 Juliana Sims <juli@incana.org>
;;; Copyright © 2023 Dominik Delgado Steuter <d@delgado.nrw>
;;; Copyright © 2023 Zhu Zihao <all_but_last@163.com>
+;;; Copyright © 2023 Zheng Junjie <873216071@qq.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -238,6 +239,7 @@ (define-module (gnu packages gnome)
#:use-module (guix git-download)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix packages)
+ #:use-module (guix platform)
#:use-module (guix utils)
#:use-module (guix gexp)
#:use-module (ice-9 match)
@@ -3593,12 +3595,12 @@ (define-public librsvg
;; In lieu of #:make-flags
(setenv "CC" #$(cc-for-target))
(setenv "PKG_CONFIG" #$(pkg-config-for-target))
- (when #$(%current-target-system)
- (setenv "RUST_TARGET"
- (string-replace
- #$(%current-target-system)
- "-unknown-linux-gnu"
- (string-index #$(%current-target-system) #\-))))
+ #$@(if (%current-target-system)
+ #~((setenv "RUST_TARGET"
+ #$(platform-rust-target
+ (lookup-platform-by-target
+ (%current-target-system)))))
+ #~())
;; Something about the build environment resists building
;; successfully with the '--locked' flag.
(substitute* '("Makefile.am" "Makefile.in")