* [bug#36676] [PATCH 0/3] cargo build system fixes
@ 2019-07-15 19:40 Robert Vollmert
2019-07-15 19:41 ` [bug#36676] [PATCH 1/3] guix: cargo-build-system: Set CARGO_HOME early to fix build Robert Vollmert
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Robert Vollmert @ 2019-07-15 19:40 UTC (permalink / raw)
To: 36676; +Cc: Robert Vollmert
Primarily this removes the build-side dependency on guile-json,
but fixes some bugs along the way.
Robert Vollmert (3):
guix: cargo-build-system: Set CARGO_HOME early to fix build
gnu: Update rust-proc-macro2 to 0.4.30 to fix tests
guix: cargo-build-system: Use bundled json instead of guile-json
gnu/packages/crates-io.scm | 4 ++--
guix/build-system/cargo.scm | 2 +-
guix/build/cargo-build-system.scm | 12 +++++-------
3 files changed, 8 insertions(+), 10 deletions(-)
--
2.20.1 (Apple Git-117)
^ permalink raw reply [flat|nested] 6+ messages in thread
* [bug#36676] [PATCH 1/3] guix: cargo-build-system: Set CARGO_HOME early to fix build
2019-07-15 19:40 [bug#36676] [PATCH 0/3] cargo build system fixes Robert Vollmert
@ 2019-07-15 19:41 ` Robert Vollmert
2019-07-15 19:41 ` [bug#36676] [PATCH 2/3] gnu: Update rust-proc-macro2 to 0.4.30 to fix tests Robert Vollmert
2019-07-15 19:41 ` [bug#36676] [PATCH 3/3] guix: cargo-build-system: Use bundled json instead of guile-json Robert Vollmert
2019-07-15 20:37 ` [bug#36676] [PATCH 0/3] cargo build system fixes Danny Milosavljevic
2019-07-16 7:57 ` bug#36676: " Danny Milosavljevic
2 siblings, 2 replies; 6+ messages in thread
From: Robert Vollmert @ 2019-07-15 19:41 UTC (permalink / raw)
To: 36676; +Cc: Robert Vollmert
This makes the packages from (gnu packages crates-io)
not fail to build outright with
starting phase `build'
error: failed to acquire package cache lock
Caused by:
failed to open: /homeless-shelter/.cargo/.package-cache
Caused by:
Permission denied (os error 13)
phase `build' failed after 0.0 seconds
* guix/build/cargo-build-system.scm (configure): Set CARGO_HOME.
(install): No longer set CARGO_HOME.
---
guix/build/cargo-build-system.scm | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/guix/build/cargo-build-system.scm b/guix/build/cargo-build-system.scm
index 1f36304b15..e4e62dd838 100644
--- a/guix/build/cargo-build-system.scm
+++ b/guix/build/cargo-build-system.scm
@@ -99,6 +99,7 @@ Cargo.toml file present at its root."
inputs)
;; Configure cargo to actually use this new directory.
+ (setenv "CARGO_HOME" (string-append (getcwd) "/.cargo"))
(mkdir-p ".cargo")
(let ((port (open-file ".cargo/config" "w" #:encoding "utf-8")))
(display "
@@ -148,9 +149,6 @@ directory = '" port)
;; Make cargo reuse all the artifacts we just built instead
;; of defaulting to making a new temp directory
(setenv "CARGO_TARGET_DIR" "./target")
- ;; Force cargo to honor our .cargo/config definitions
- ;; https://github.com/rust-lang/cargo/issues/6397
- (setenv "CARGO_HOME" ".")
;; Only install crates which include binary targets,
;; otherwise cargo will raise an error.
--
2.20.1 (Apple Git-117)
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [bug#36676] [PATCH 2/3] gnu: Update rust-proc-macro2 to 0.4.30 to fix tests
2019-07-15 19:41 ` [bug#36676] [PATCH 1/3] guix: cargo-build-system: Set CARGO_HOME early to fix build Robert Vollmert
@ 2019-07-15 19:41 ` Robert Vollmert
2019-07-15 19:41 ` [bug#36676] [PATCH 3/3] guix: cargo-build-system: Use bundled json instead of guile-json Robert Vollmert
1 sibling, 0 replies; 6+ messages in thread
From: Robert Vollmert @ 2019-07-15 19:41 UTC (permalink / raw)
To: 36676; +Cc: Robert Vollmert
Previously, one test was failing:
failures:
test_debug_tokenstream
test result: FAILED. 19 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out
* gnu/packages/crates-io.scm (rust-proc-macro2): Update to 0.4.30.
---
gnu/packages/crates-io.scm | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
index b480b6fe56..db9665d1aa 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -47,7 +47,7 @@ or XID_Continue properties according to Unicode Standard Annex #31.")
(define-public rust-proc-macro2
(package
(name "rust-proc-macro2")
- (version "0.4.27")
+ (version "0.4.30")
(source
(origin
(method url-fetch)
@@ -56,7 +56,7 @@ or XID_Continue properties according to Unicode Standard Annex #31.")
(string-append name "-" version ".tar.gz"))
(sha256
(base32
- "05c92v787snyaq4ss16vxc9mdv6zndfgsdq8k3hnnyffmsf7ycad"))))
+ "0nd71fl24sys066jrha6j7i34nfkjv44yzw8yww9742wmc8j0gfg"))))
(build-system cargo-build-system)
(arguments
`(#:cargo-inputs (("rust-unicode-xid" ,rust-unicode-xid))
--
2.20.1 (Apple Git-117)
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [bug#36676] [PATCH 3/3] guix: cargo-build-system: Use bundled json instead of guile-json
2019-07-15 19:41 ` [bug#36676] [PATCH 1/3] guix: cargo-build-system: Set CARGO_HOME early to fix build Robert Vollmert
2019-07-15 19:41 ` [bug#36676] [PATCH 2/3] gnu: Update rust-proc-macro2 to 0.4.30 to fix tests Robert Vollmert
@ 2019-07-15 19:41 ` Robert Vollmert
1 sibling, 0 replies; 6+ messages in thread
From: Robert Vollmert @ 2019-07-15 19:41 UTC (permalink / raw)
To: 36676; +Cc: Robert Vollmert
Per https://lists.gnu.org/archive/html/guix-devel/2019-07/msg00193.html
* guix/build/cargo-build-system.scm: Use (gnu build json) instead
of (json parser).
* guix/build-system/cargo.scm: Import (gnu build json) instead of
(json parser).
---
guix/build-system/cargo.scm | 2 +-
guix/build/cargo-build-system.scm | 8 ++++----
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/guix/build-system/cargo.scm b/guix/build-system/cargo.scm
index fa211d456d..10a1bac844 100644
--- a/guix/build-system/cargo.scm
+++ b/guix/build-system/cargo.scm
@@ -61,7 +61,7 @@ to NAME and VERSION."
(define %cargo-build-system-modules
;; Build-side modules imported by default.
`((guix build cargo-build-system)
- (json parser)
+ (guix build json)
,@%cargo-utils-modules))
(define* (cargo-build store name inputs
diff --git a/guix/build/cargo-build-system.scm b/guix/build/cargo-build-system.scm
index e4e62dd838..f38de16cf7 100644
--- a/guix/build/cargo-build-system.scm
+++ b/guix/build/cargo-build-system.scm
@@ -20,6 +20,7 @@
(define-module (guix build cargo-build-system)
#:use-module ((guix build gnu-build-system) #:prefix gnu:)
+ #:use-module (guix build json)
#:use-module (guix build utils)
#:use-module (guix build cargo-utils)
#:use-module (ice-9 popen)
@@ -27,7 +28,6 @@
#:use-module (ice-9 ftw)
#:use-module (ice-9 format)
#:use-module (ice-9 match)
- #:use-module (json parser)
#:use-module (srfi srfi-1)
#:use-module (srfi srfi-26)
#:export (%standard-phases
@@ -42,15 +42,15 @@
(define (manifest-targets)
"Extract all targets from the Cargo.toml manifest"
(let* ((port (open-input-pipe "cargo read-manifest"))
- (data (json->scm port))
- (targets (hash-ref data "targets" '())))
+ (data (read-json port))
+ (targets (or (assoc-ref data "targets") '())))
(close-port port)
targets))
(define (has-executable-target?)
"Check if the current cargo project declares any binary targets."
(let* ((bin? (lambda (kind) (string=? kind "bin")))
- (get-kinds (lambda (dep) (hash-ref dep "kind")))
+ (get-kinds (lambda (dep) (assoc-ref dep "kind")))
(bin-dep? (lambda (dep) (find bin? (get-kinds dep)))))
(find bin-dep? (manifest-targets))))
--
2.20.1 (Apple Git-117)
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [bug#36676] [PATCH 0/3] cargo build system fixes
2019-07-15 19:40 [bug#36676] [PATCH 0/3] cargo build system fixes Robert Vollmert
2019-07-15 19:41 ` [bug#36676] [PATCH 1/3] guix: cargo-build-system: Set CARGO_HOME early to fix build Robert Vollmert
@ 2019-07-15 20:37 ` Danny Milosavljevic
2019-07-16 7:57 ` bug#36676: " Danny Milosavljevic
2 siblings, 0 replies; 6+ messages in thread
From: Danny Milosavljevic @ 2019-07-15 20:37 UTC (permalink / raw)
To: Robert Vollmert; +Cc: 36676
[-- Attachment #1: Type: text/plain, Size: 21 bytes --]
These patches LGTM!
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#36676: [PATCH 0/3] cargo build system fixes
2019-07-15 19:40 [bug#36676] [PATCH 0/3] cargo build system fixes Robert Vollmert
2019-07-15 19:41 ` [bug#36676] [PATCH 1/3] guix: cargo-build-system: Set CARGO_HOME early to fix build Robert Vollmert
2019-07-15 20:37 ` [bug#36676] [PATCH 0/3] cargo build system fixes Danny Milosavljevic
@ 2019-07-16 7:57 ` Danny Milosavljevic
2 siblings, 0 replies; 6+ messages in thread
From: Danny Milosavljevic @ 2019-07-16 7:57 UTC (permalink / raw)
To: Robert Vollmert; +Cc: 36676-done
[-- Attachment #1: Type: text/plain, Size: 201 bytes --]
Hi Robert,
thanks!
I've pushed these to guix master as commits
c82c16a6f3cfeec82ba8bd7572b11852a6152c7e,
848862f0297dfb50197638a0828ba1e714a07074,
4fde0030d42068b347d7af58ed3b746c5ea2f877.
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2019-07-16 7:58 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-07-15 19:40 [bug#36676] [PATCH 0/3] cargo build system fixes Robert Vollmert
2019-07-15 19:41 ` [bug#36676] [PATCH 1/3] guix: cargo-build-system: Set CARGO_HOME early to fix build Robert Vollmert
2019-07-15 19:41 ` [bug#36676] [PATCH 2/3] gnu: Update rust-proc-macro2 to 0.4.30 to fix tests Robert Vollmert
2019-07-15 19:41 ` [bug#36676] [PATCH 3/3] guix: cargo-build-system: Use bundled json instead of guile-json Robert Vollmert
2019-07-15 20:37 ` [bug#36676] [PATCH 0/3] cargo build system fixes Danny Milosavljevic
2019-07-16 7:57 ` bug#36676: " Danny Milosavljevic
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).