aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDanny Milosavljevic <dannym@friendly-machines.com>2024-12-21 20:17:29 +0100
committerDanny Milosavljevic <dannym@friendly-machines.com>2024-12-21 20:22:52 +0100
commitce2d003da47320a7268ca992101047365d357e24 (patch)
treeb62d38b672521bdb93f2c5dc05bd51c1cb8570ea
parent63041aacbb3e557dc35a2a4181ddd510acace5ec (diff)
downloadguix-ce2d003da47320a7268ca992101047365d357e24.tar.gz
guix-ce2d003da47320a7268ca992101047365d357e24.zip
gnu: c2rust: Clean up environment variable names.
* gnu/packages/c2rust.scm (rust-c2rust-ast-exporter-0.18)[arguments] <#:phases>[bundle-tinycbor]: Define GUIX_TINYCBOR_SOURCE_DIR. (c2rust)[arguments]<#:phases>[patch]: Define GUIX_TINYCBOR_SOURCE_DIR. * gnu/packages/patches/c2rust-ast-exporter-local-search.patch: Use GUIX_TINYCBOR_SOURCE_DIR. Change-Id: I2794016aaa56e5358a8153faf0e46ffb22d6b293
-rw-r--r--gnu/packages/c2rust.scm4
-rw-r--r--gnu/packages/patches/c2rust-ast-exporter-local-search.patch2
2 files changed, 3 insertions, 3 deletions
diff --git a/gnu/packages/c2rust.scm b/gnu/packages/c2rust.scm
index a4ba8217de..fce7d654d0 100644
--- a/gnu/packages/c2rust.scm
+++ b/gnu/packages/c2rust.scm
@@ -188,7 +188,7 @@
;; The build process will slightly patch the sources.
(copy-recursively (assoc-ref inputs "tinycbor-src")
"/tmp/tinycbor")
- (setenv "CMAKE_TINYCBOR_SOURCE_DIR" "/tmp/tinycbor"))))
+ (setenv "GUIX_TINYCBOR_SOURCE_DIR" "/tmp/tinycbor"))))
#:skip-build? #f
#:cargo-inputs (("rust-bindgen" ,rust-bindgen-0.65)
("rust-c2rust-build-paths" ,rust-c2rust-build-paths-0.18)
@@ -291,7 +291,7 @@
;; The build process will slightly patch the sources.
(copy-recursively (assoc-ref inputs "tinycbor-src")
"/tmp/tinycbor")
- (setenv "CMAKE_TINYCBOR_SOURCE_DIR" "/tmp/tinycbor"))))))
+ (setenv "GUIX_TINYCBOR_SOURCE_DIR" "/tmp/tinycbor"))))))
(home-page "https://c2rust.com/")
(synopsis "C to Rust translation, refactoring, and cross-checking")
(description
diff --git a/gnu/packages/patches/c2rust-ast-exporter-local-search.patch b/gnu/packages/patches/c2rust-ast-exporter-local-search.patch
index 959321a9f7..211873ef69 100644
--- a/gnu/packages/patches/c2rust-ast-exporter-local-search.patch
+++ b/gnu/packages/patches/c2rust-ast-exporter-local-search.patch
@@ -18,7 +18,7 @@ diff -ru orig/c2rust-ast-exporter-0.18.0/build.rs c2rust-ast-exporter-0.18.0/bui
// Build libclangAstExporter.a with cmake
let dst = Config::new("src")
// Where to find LLVM/Clang CMake files
-+ .define("TINYCBOR_SOURCE_DIR", &env!("CMAKE_TINYCBOR_SOURCE_DIR"))
++ .define("TINYCBOR_SOURCE_DIR", &env!("GUIX_TINYCBOR_SOURCE_DIR"))
.define("LLVM_DIR", &format!("{}/cmake/llvm", llvm_lib_dir))
.define("Clang_DIR", &format!("{}/cmake/clang", llvm_lib_dir))
// What to build