diff options
| author | Efraim Flashner <efraim@flashner.co.il> | 2024-12-25 20:45:45 +0200 |
|---|---|---|
| committer | Efraim Flashner <efraim@flashner.co.il> | 2025-01-06 12:19:15 +0200 |
| commit | e858cf2eaf7904845321236d4f1b8932e874c2fb (patch) | |
| tree | 3793a8393a85a637873d4cda154471d537bb8b02 /gnu | |
| parent | 3d9ca89d22ea1f164a0a010f1cbd6240a1845558 (diff) | |
gnu: c2rust: Improve the package.
* gnu/packages/c2rust.scm (c2rust)[source]: Add snippet to allow for
newer versions of dependencies.
[arguments]: Don't install the sources. Remove custom 'patch-deps
phase.
[native-inputs]: Replace cmake with cmake-minimal.
Change-Id: I8ba137de54e767a36c772b98ac16101b9aa1bafb
Diffstat (limited to 'gnu')
| -rw-r--r-- | gnu/packages/c2rust.scm | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/gnu/packages/c2rust.scm b/gnu/packages/c2rust.scm index 170142184fb..48711c8b52d 100644 --- a/gnu/packages/c2rust.scm +++ b/gnu/packages/c2rust.scm | |||
| @@ -1,5 +1,6 @@ | |||
| 1 | ;;; GNU Guix --- Functional package management for GNU | 1 | ;;; GNU Guix --- Functional package management for GNU |
| 2 | ;;; Copyright © 2024 Danny Milosavljevic <dannym@friendly-machines.com> | 2 | ;;; Copyright © 2024 Danny Milosavljevic <dannym@friendly-machines.com> |
| 3 | ;;; Copyright © 2024 Efraim Flashner <efraim@flashner.co.il> | ||
| 3 | ;;; | 4 | ;;; |
| 4 | ;;; This file is part of GNU Guix. | 5 | ;;; This file is part of GNU Guix. |
| 5 | ;;; | 6 | ;;; |
| @@ -256,15 +257,21 @@ | |||
| 256 | (uri (crate-uri "c2rust" version)) | 257 | (uri (crate-uri "c2rust" version)) |
| 257 | (file-name (string-append name "-" version ".tar.gz")) | 258 | (file-name (string-append name "-" version ".tar.gz")) |
| 258 | (sha256 | 259 | (sha256 |
| 259 | (base32 "1rg9cvvmh9zw89mz2bpyvqlwbfhzl5dw2hab9z6d5rasr8mir7nh")))) | 260 | (base32 "1rg9cvvmh9zw89mz2bpyvqlwbfhzl5dw2hab9z6d5rasr8mir7nh")) |
| 261 | (modules '((guix build utils))) | ||
| 262 | (snippet | ||
| 263 | '(begin (substitute* "Cargo.toml" | ||
| 264 | (("\"= ?([[:digit:]]+(\\.[[:digit:]]+)*)" _ version) | ||
| 265 | (string-append "\"^" version))))))) | ||
| 260 | (build-system cargo-build-system) | 266 | (build-system cargo-build-system) |
| 261 | (native-inputs | 267 | (native-inputs |
| 262 | `(("tinycbor-src" ,%tinycbor-source) | 268 | `(("tinycbor-src" ,%tinycbor-source) |
| 263 | ("cmake" ,cmake) | 269 | ("cmake" ,cmake-minimal) |
| 264 | ("clang" ,clang))) | 270 | ("clang" ,clang))) |
| 265 | (inputs (list llvm)) | 271 | (inputs (list llvm)) |
| 266 | (arguments | 272 | (arguments |
| 267 | `(#:cargo-inputs (("rust-anyhow" ,rust-anyhow-1) | 273 | `(#:install-source? #f |
| 274 | #:cargo-inputs (("rust-anyhow" ,rust-anyhow-1) | ||
| 268 | ("rust-c2rust-build-paths" ,rust-c2rust-build-paths-0.18) | 275 | ("rust-c2rust-build-paths" ,rust-c2rust-build-paths-0.18) |
| 269 | ("rust-c2rust-transpile" ,rust-c2rust-transpile-0.18) | 276 | ("rust-c2rust-transpile" ,rust-c2rust-transpile-0.18) |
| 270 | ("rust-clap" ,rust-clap-3) | 277 | ("rust-clap" ,rust-clap-3) |
| @@ -277,11 +284,6 @@ | |||
| 277 | ("rust-time-macros" ,rust-time-macros-0.2)) | 284 | ("rust-time-macros" ,rust-time-macros-0.2)) |
| 278 | #:phases | 285 | #:phases |
| 279 | (modify-phases %standard-phases | 286 | (modify-phases %standard-phases |
| 280 | (add-after 'unpack 'patch-deps | ||
| 281 | (lambda _ | ||
| 282 | ;; This is incorrect in the release to begin with. | ||
| 283 | (substitute* "Cargo.toml" | ||
| 284 | (("=0.2.6") "=0.2.18")))) | ||
| 285 | (add-before 'build 'patch | 287 | (add-before 'build 'patch |
| 286 | (lambda* (#:key inputs #:allow-other-keys) | 288 | (lambda* (#:key inputs #:allow-other-keys) |
| 287 | ;; The build process will slightly patch the sources. | 289 | ;; The build process will slightly patch the sources. |
