From 4b81d5c4bc442a12c681586f6c25a4ca0af44056 Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Tue, 26 Mar 2019 21:31:07 +0100 Subject: gnu: ldc-bootstrap: Use INVOKE. * gnu/packages/dlang.scm (ldc-bootstrap)[arguments]: Use INVOKE and unconditionally return #T from build phase. --- gnu/packages/dlang.scm | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'gnu/packages/dlang.scm') diff --git a/gnu/packages/dlang.scm b/gnu/packages/dlang.scm index 2530b8a3c7..ddd747a156 100644 --- a/gnu/packages/dlang.scm +++ b/gnu/packages/dlang.scm @@ -103,12 +103,13 @@ and freshness without requiring additional information from the user.") (lambda* (#:key inputs #:allow-other-keys) (let ((unpack (lambda (source target) (with-directory-excursion target - (zero? (system* "tar" "xvf" - (assoc-ref inputs source) - "--strip-components=1")))))) - (and (unpack "phobos-src" "runtime/phobos") - (unpack "druntime-src" "runtime/druntime") - (unpack "dmd-testsuite-src" "tests/d2/dmd-testsuite"))))) + (invoke "tar" "xvf" + (assoc-ref inputs source) + "--strip-components=1"))))) + (unpack "phobos-src" "runtime/phobos") + (unpack "druntime-src" "runtime/druntime") + (unpack "dmd-testsuite-src" "tests/d2/dmd-testsuite") + #t))) (add-after 'unpack-submodule-sources 'patch-dmd2 (lambda* (#:key inputs #:allow-other-keys) (substitute* "dmd2/root/port.c" -- cgit v1.2.3 From 68631e037bd79039b5b14150e01f64cd8f81eabb Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Tue, 26 Mar 2019 21:35:46 +0100 Subject: gnu: ldc: Use INVOKE. * gnu/packages/dlang.scm (ldc)[arguments]: Use INVOKE. --- gnu/packages/dlang.scm | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'gnu/packages/dlang.scm') diff --git a/gnu/packages/dlang.scm b/gnu/packages/dlang.scm index ddd747a156..c164ed849a 100644 --- a/gnu/packages/dlang.scm +++ b/gnu/packages/dlang.scm @@ -211,12 +211,12 @@ bootstrapping more recent compilers written in D.") (lambda* (#:key inputs #:allow-other-keys) (let ((unpack (lambda (source target) (with-directory-excursion target - (zero? (system* "tar" "xvf" - (assoc-ref inputs source) - "--strip-components=1")))))) - (and (unpack "phobos-src" "runtime/phobos") - (unpack "druntime-src" "runtime/druntime") - (unpack "dmd-testsuite-src" "tests/d2/dmd-testsuite"))))) + (invoke "tar" "xvf" + (assoc-ref inputs source) + "--strip-components=1"))))) + (unpack "phobos-src" "runtime/phobos") + (unpack "druntime-src" "runtime/druntime") + (unpack "dmd-testsuite-src" "tests/d2/dmd-testsuite")))) (add-after 'unpack-submodule-sources 'patch-phobos (lambda* (#:key inputs #:allow-other-keys) (substitute* '("runtime/phobos/std/process.d" -- cgit v1.2.3 From d57748e3674b062e7ca13991c872f447c53838f0 Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Mon, 8 Apr 2019 23:12:45 +0200 Subject: gnu: ldc@0.17.4: Don't use unstable tarball. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/dlang.scm (ldc-bootstrap)[source]: Use GIT-FETCH and GIT-FILE-NAME. [native-inputs]: Likewise. [arguments]: Adjust ‘unpack-submodule-sources’ phase accordingly. --- gnu/packages/dlang.scm | 70 ++++++++++++++++++++++++++------------------------ 1 file changed, 37 insertions(+), 33 deletions(-) (limited to 'gnu/packages/dlang.scm') diff --git a/gnu/packages/dlang.scm b/gnu/packages/dlang.scm index c164ed849a..645ab5785b 100644 --- a/gnu/packages/dlang.scm +++ b/gnu/packages/dlang.scm @@ -3,7 +3,7 @@ ;;; Copyright © 2015, 2018 Pjotr Prins ;;; Copyright © 2017 Frederick Muriithi ;;; Copyright © 2017 Ricardo Wurmus -;;; Copyright © 2017 Tobias Geerinckx-Rice +;;; Copyright © 2017, 2019 Tobias Geerinckx-Rice ;;; ;;; This file is part of GNU Guix. ;;; @@ -81,15 +81,15 @@ and freshness without requiring additional information from the user.") (package (name "ldc") (version "0.17.4") - (source (origin - (method url-fetch) - (uri (string-append - "https://github.com/ldc-developers/ldc/archive/v" - version ".tar.gz")) - (file-name (string-append name "-" version ".tar.gz")) - (sha256 - (base32 - "1kw0j378k6bh0k66dvx99bjq8ilp8bb24w3jrmibn8rhmqv0d5q8")))) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/ldc-developers/ldc.git") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "0nnrjavfmpfp7bib04isqlxvyzh6mlvsdan0gxysdz96hlg4hcq8")))) (build-system cmake-build-system) (supported-systems '("x86_64-linux" "i686-linux" "armhf-linux")) (properties @@ -101,11 +101,15 @@ and freshness without requiring additional information from the user.") (modify-phases %standard-phases (add-after 'unpack 'unpack-submodule-sources (lambda* (#:key inputs #:allow-other-keys) - (let ((unpack (lambda (source target) - (with-directory-excursion target - (invoke "tar" "xvf" - (assoc-ref inputs source) - "--strip-components=1"))))) + (let ((unpack (lambda (input target) + (let ((source (assoc-ref inputs input))) + ;; Git checkouts are directories as long as + ;; there are no patches; tarballs otherwise. + (if (file-is-directory? source) + (copy-recursively source target) + (with-directory-excursion target + (invoke "tar" "xvf" source + "--strip-components=1"))))))) (unpack "phobos-src" "runtime/phobos") (unpack "druntime-src" "runtime/druntime") (unpack "dmd-testsuite-src" "tests/d2/dmd-testsuite") @@ -147,32 +151,32 @@ and freshness without requiring additional information from the user.") ("unzip" ,unzip) ("phobos-src" ,(origin - (method url-fetch) - (uri (string-append - "https://github.com/ldc-developers/phobos/archive/ldc-v" - version ".tar.gz")) + (method git-fetch) + (uri (git-reference + (url "https://github.com/ldc-developers/phobos.git") + (commit (string-append "ldc-v" version)))) + (file-name (git-file-name "phobos" version)) (sha256 - (base32 - "16x36kp46mqiihxx7jvr1d3mv3b96yfmhinb9lzinh2m4clr85wz")) + (base32 "0i7gh99w4mi0hdv16261jcdiqyv1nkjdcwy9prw32s0lvplx8fdy")) (patches (search-patches "ldc-bootstrap-disable-tests.patch")))) ("druntime-src" ,(origin - (method url-fetch) - (uri (string-append - "https://github.com/ldc-developers/druntime/archive/ldc-v" - version ".tar.gz")) + (method git-fetch) + (uri (git-reference + (url "https://github.com/ldc-developers/druntime.git") + (commit (string-append "ldc-v" version)))) + (file-name (git-file-name "druntime" version)) (sha256 - (base32 - "0iw2xxhcbsc5f1707dgdzhff528363l4faqdk513gaxs2dhfx8vx")))) + (base32 "0alabm3bbvs94msvxz5psiwk4f51cw9h82z1p5hhsnf8ja6d0am7")))) ("dmd-testsuite-src" ,(origin - (method url-fetch) - (uri (string-append - "https://github.com/ldc-developers/dmd-testsuite/archive/ldc-v" - version ".tar.gz")) + (method git-fetch) + (uri (git-reference + (url "https://github.com/ldc-developers/dmd-testsuite.git") + (commit (string-append "ldc-v" version)))) + (file-name (git-file-name "dmd-testsuite" version)) (sha256 - (base32 - "0z6ch930wjkg2vlnqkbliwxxxifad6ydsdpwdxwnajkb2kaxsjx4")))))) + (base32 "05qr4cgb4scfqzbw1l5pk72kil074mvj9d55b165ljyr51sgwgbl")))))) (home-page "http://wiki.dlang.org/LDC") (synopsis "LLVM-based compiler for the D programming language") (description -- cgit v1.2.3 From 36f7fbca137aea4d996f2e8b40d3602b1dc996ae Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Mon, 8 Apr 2019 23:15:22 +0200 Subject: gnu: ldc: Don't use unstable tarball. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/dlang.scm (ldc)[source]: Use GIT-FETCH and GIT-FILE-NAME. [native-inputs]: Likewise. [arguments]: Adjust ‘unpack-submodule-sources’ phase accordingly. --- gnu/packages/dlang.scm | 85 ++++++++++++++++++++++++++------------------------ 1 file changed, 45 insertions(+), 40 deletions(-) (limited to 'gnu/packages/dlang.scm') diff --git a/gnu/packages/dlang.scm b/gnu/packages/dlang.scm index 645ab5785b..630270487d 100644 --- a/gnu/packages/dlang.scm +++ b/gnu/packages/dlang.scm @@ -199,28 +199,33 @@ bootstrapping more recent compilers written in D.") (inherit ldc-bootstrap) (name "ldc") (version "1.10.0") - (source (origin - (method url-fetch) - (uri (string-append - "https://github.com/ldc-developers/ldc/archive/v" - version ".tar.gz")) - (file-name (string-append name "-" version ".tar.gz")) - (sha256 - (base32 - "16b1h9kwfggjw6ykc6sfs26ak6vypylsx9wmvp5m6x3cvi6g70yi")))) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/ldc-developers/ldc.git") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "0qcb2rn01wql7y8qp31blbv3hwmnh3zjgzi2n7k168cxr6rrdhlp")))) (arguments `(#:phases (modify-phases %standard-phases (add-after 'unpack 'unpack-submodule-sources (lambda* (#:key inputs #:allow-other-keys) - (let ((unpack (lambda (source target) - (with-directory-excursion target - (invoke "tar" "xvf" - (assoc-ref inputs source) - "--strip-components=1"))))) + (let ((unpack (lambda (input target) + (let ((source (assoc-ref inputs input))) + ;; Git checkouts are directories as long as + ;; there are no patches; tarballs otherwise. + (if (file-is-directory? source) + (copy-recursively source target) + (with-directory-excursion target + (invoke "tar" "xvf" source + "--strip-components=1"))))))) (unpack "phobos-src" "runtime/phobos") (unpack "druntime-src" "runtime/druntime") - (unpack "dmd-testsuite-src" "tests/d2/dmd-testsuite")))) + (unpack "dmd-testsuite-src" "tests/d2/dmd-testsuite") + #t))) (add-after 'unpack-submodule-sources 'patch-phobos (lambda* (#:key inputs #:allow-other-keys) (substitute* '("runtime/phobos/std/process.d" @@ -228,7 +233,7 @@ bootstrapping more recent compilers written in D.") (("/bin/sh") (which "sh")) (("echo") (which "echo"))) (substitute* "tests/d2/dmd-testsuite/Makefile" - (("/bin/bash") (which "bash"))) + (("/bin/bash") (which "bash"))) ;; disable unittests in the following files. We are discussing with ;; upstream (substitute* '("runtime/phobos/std/net/curl.d" @@ -245,14 +250,14 @@ bootstrapping more recent compilers written in D.") (delete-file "tests/plugins/addFuncEntryCall/testPlugin.d") ;; the following tests requires AVX instruction set in the CPU. (substitute* "tests/d2/dmd-testsuite/runnable/test_cdvecfill.d" - (("^// DISABLED: ") "^// DISABLED: linux64 ")) + (("^// DISABLED: ") "^// DISABLED: linux64 ")) #t)) (replace 'check - (lambda* (#:key inputs outputs #:allow-other-keys) - ;; some tests call into gdb binary which needs SHELL and CC set - (setenv "SHELL" (which "sh")) - (setenv "CC" (string-append (assoc-ref inputs "gcc") "/bin/gcc")) - (invoke "make" "test" "-j" (number->string (parallel-job-count)))))))) + (lambda* (#:key inputs outputs #:allow-other-keys) + ;; some tests call into gdb binary which needs SHELL and CC set + (setenv "SHELL" (which "sh")) + (setenv "CC" (string-append (assoc-ref inputs "gcc") "/bin/gcc")) + (invoke "make" "test" "-j" (number->string (parallel-job-count)))))))) (native-inputs `(("llvm" ,llvm-6) ("clang" ,clang-6) @@ -263,13 +268,13 @@ bootstrapping more recent compilers written in D.") ("gdb" ,gdb) ("phobos-src" ,(origin - (method url-fetch) - (uri (string-append - "https://github.com/ldc-developers/phobos/archive/ldc-v" - older-version ".tar.gz")) + (method git-fetch) + (uri (git-reference + (url "https://github.com/ldc-developers/phobos.git") + (commit (string-append "ldc-v" older-version)))) + (file-name (git-file-name "phobos" older-version)) (sha256 - (base32 - "0cpmrww00xf1qx38bcc22rr05qw41p00p45yb5fbwnfaccfwdn0s")) + (base32 "1gmlwnjdcf6s5aahadxsif9l5nyaj0rrn379g6fmhcvdk64kf509")) ;; This patch deactivates some tests that depend on network access ;; to pass. It also deactivates some tests that have some reliance ;; on timezone. @@ -282,22 +287,22 @@ bootstrapping more recent compilers written in D.") (patches (search-patches "ldc-disable-phobos-tests.patch")))) ("druntime-src" ,(origin - (method url-fetch) - (uri (string-append - "https://github.com/ldc-developers/druntime/archive/ldc-v" - older-version ".tar.gz")) + (method git-fetch) + (uri (git-reference + (url "https://github.com/ldc-developers/druntime.git") + (commit (string-append "ldc-v" older-version)))) + (file-name (git-file-name "druntime" older-version)) (sha256 - (base32 - "1akh2vdi98jih8642yjbvv2vavxzrmq24kz8i3kfidg5ndqyv222")))) + (base32 "0a3yyjcnpvm5fbdczf76fx08kl154w17w06hlxf0j3p1p4jc85aj")))) ("dmd-testsuite-src" ,(origin - (method url-fetch) - (uri (string-append - "https://github.com/ldc-developers/dmd-testsuite/archive/ldc-v" - older-version ".tar.gz")) + (method git-fetch) + (uri (git-reference + (url "https://github.com/ldc-developers/dmd-testsuite.git") + (commit (string-append "ldc-v" older-version)))) + (file-name (git-file-name "dmd-testsuite" older-version)) (sha256 - (base32 - "0z5x07qrbkpksshaymp11ir6jlmg9wjicxn6zhp8cya6i1ha9p99"))))))))) + (base32 "0mm3rliki1nqiqfaha7ssvm156aa398vpvf4v6895m7nn1mz7rss"))))))))) (define-public dub (package -- cgit v1.2.3 From 454866c6e37cb8b1fa19d5a8e2e292c422360f30 Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Mon, 8 Apr 2019 23:16:17 +0200 Subject: gnu: dub: Don't use unstable tarball. * gnu/packages/dlang.scm (dub)[source]: Use GIT-FETCH and GIT-FILE-NAME. --- gnu/packages/dlang.scm | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) (limited to 'gnu/packages/dlang.scm') diff --git a/gnu/packages/dlang.scm b/gnu/packages/dlang.scm index 630270487d..3b0c799dc3 100644 --- a/gnu/packages/dlang.scm +++ b/gnu/packages/dlang.scm @@ -308,15 +308,16 @@ bootstrapping more recent compilers written in D.") (package (name "dub") (version "1.7.2") - (source (origin - (method url-fetch) - (uri (string-append "https://github.com/dlang/dub/archive/" - "v" version ".tar.gz")) - (file-name (string-append name "-" version ".tar.gz")) - (sha256 - (base32 - "1jvr1mmq8j77wnsrsg7x2xv8yfljqd6x8gn6yy7dd6h6y3cf408q")))) - (build-system gnu-build-system) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/dlang/dub.git") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "073ibvgm1gphcqs1yjrav9ryp677nh3b194nxmvicwgvdc0sb6w9")))) + (build-system gnu-build-system) (arguments `(#:tests? #f ; it would have tested itself by installing some packages (vibe etc) #:phases -- cgit v1.2.3