diff options
author | David Craven <david@craven.ch> | 2017-01-01 16:11:55 +0100 |
---|---|---|
committer | David Craven <david@craven.ch> | 2017-01-01 18:11:57 +0100 |
commit | dc77498c1c6e3aaef9aae1cac189e6d9db470952 (patch) | |
tree | 5b8379c6288d42b6325b06a9382359969208fbd1 | |
parent | 395bbfdbea205bfd2d385108e53fd8a3058c54c3 (diff) | |
download | guix-dc77498c1c6e3aaef9aae1cac189e6d9db470952.tar guix-dc77498c1c6e3aaef9aae1cac189e6d9db470952.tar.gz |
build-system: cargo: Make Cargo.toml writeable.
* guix/build/cargo-build-system.scm (configure): Make sure Cargo.toml
is writeable before attempting modification.
Problem reported by Danny Milosavljevic <dannym@scratchpost.org>.
-rw-r--r-- | guix/build/cargo-build-system.scm | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/guix/build/cargo-build-system.scm b/guix/build/cargo-build-system.scm index 460d829b3c..4fa29b4cd3 100644 --- a/guix/build/cargo-build-system.scm +++ b/guix/build/cargo-build-system.scm @@ -43,6 +43,8 @@ (define* (configure #:key inputs #:allow-other-keys) "Replace Cargo.toml [dependencies] section with guix inputs." + ;; Make sure Cargo.toml is writeable when the crate uses git-fetch. + (chmod "Cargo.toml" #o644) (let ((port (open-file "Cargo.toml" "a" #:encoding "utf-8"))) (format port "~%[replace]~%") (for-each |