From 84fa2ced47e16de66674ca169845a6f08cb5ef6c Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Tue, 6 Oct 2020 01:01:33 +0200 Subject: gnu: vlang: Update to 0.1.29. * gnu/packages/vlang.scm (vlang): Update to 0.1.29. --- gnu/packages/vlang.scm | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) (limited to 'gnu/packages/vlang.scm') diff --git a/gnu/packages/vlang.scm b/gnu/packages/vlang.scm index 70133bb233..42dd27a915 100644 --- a/gnu/packages/vlang.scm +++ b/gnu/packages/vlang.scm @@ -1,5 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2020 Ryan Prior +;;; Copyright © 2020 Tobias Geerinckx-Rice ;;; ;;; This file is part of GNU Guix. ;;; @@ -26,7 +27,7 @@ (define-public vlang (package (name "vlang") - (version "0.1.27") + (version "0.1.29") (source (origin (method git-fetch) @@ -35,20 +36,19 @@ (commit version))) (file-name (git-file-name name version)) (sha256 - (base32 "1d9qhacllvkqif42jaayixhjyhx7pzslh8p1yr5p19447q763fq1")))) + (base32 "1rqi7cah5nq8aggrib9xvdpfjxq20li91svv0w9yny6nn1ag7snx")))) (build-system gnu-build-system) (arguments - '(#:tests? #f ; tests are broken in v 0.1.27 + '(#:tests? #f ; some tests are broken #:make-flags `("CC=gcc" + "TMPTCC=tcc" + ,(string-append "VC=" (assoc-ref %build-inputs "vc")) "GITCLEANPULL=true" "GITFASTCLONE=mkdir -p" "TCCREPO=" - "TMPTCC=tcc" - ,(string-append "TMPVC=" (assoc-ref %build-inputs "vc")) "VCREPO=" - "VERBOSE=1" - "V_ALWAYS_CLEAN_TMP=false") + "VERBOSE=1") #:phases (modify-phases %standard-phases (delete 'configure) @@ -90,7 +90,9 @@ `(("glib" ,glib))) (native-inputs `(("vc" - ,(let ((vc-version "0884d7092f4c2a4f8ca16da6f1792efa235247be")) + ;; Versions are not consistently tagged, but the matching commit will + ;; probably have ‘v0.x.y’ in the commit message. + ,(let ((vc-version "b01d0fcda4b55861baa4be82e307cca4834b1641")) ;; v bootstraps from generated c source code from a dedicated ;; repository. It's readable, as generated source goes, and not at all ;; obfuscated, and it's about 15kb. The original source written in @@ -104,7 +106,7 @@ (commit vc-version))) (file-name (git-file-name "vc" vc-version)) (sha256 - (base32 "17bs09iwxfd0si70j48n9nd16gfgcj8imd0azypk3xzzbz4wybnz"))))))) + (base32 "052gp5q2k31r3lci3rx4k0vy0vjdjva64xvrbbihn8lgmw63lc9f"))))))) (home-page "https://vlang.io/") (synopsis "Compiler for the V programming language") (description -- cgit 1.4.1 From ec7da7d6289eac9d4aa69be8c0666605725d2333 Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Tue, 6 Oct 2020 01:02:53 +0200 Subject: gnu: vlang: Run mosts tests. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/vlang.scm (vlang)[arguments]: Enable tests and add a new ‘delete-failing-tests’ and custom ‘check’ phase. [native-inputs]: Add libx11, node, openssl, and sqlite. --- gnu/packages/vlang.scm | 47 +++++++++++++++++++++++++++++++++-------------- 1 file changed, 33 insertions(+), 14 deletions(-) (limited to 'gnu/packages/vlang.scm') diff --git a/gnu/packages/vlang.scm b/gnu/packages/vlang.scm index 42dd27a915..6f6aa79ce5 100644 --- a/gnu/packages/vlang.scm +++ b/gnu/packages/vlang.scm @@ -19,6 +19,10 @@ (define-module (gnu packages vlang) #:use-module (gnu packages glib) + #:use-module (gnu packages node) + #:use-module (gnu packages sqlite) + #:use-module (gnu packages tls) + #:use-module (gnu packages xorg) #:use-module (guix build-system gnu) #:use-module (guix git-download) #:use-module ((guix licenses) #:prefix license:) @@ -39,8 +43,7 @@ (base32 "1rqi7cah5nq8aggrib9xvdpfjxq20li91svv0w9yny6nn1ag7snx")))) (build-system gnu-build-system) (arguments - '(#:tests? #f ; some tests are broken - #:make-flags + '(#:make-flags `("CC=gcc" "TMPTCC=tcc" ,(string-append "VC=" (assoc-ref %build-inputs "vc")) @@ -58,17 +61,27 @@ (("rm -rf") "true") (("v self") "v -cc gcc cmd/v")) #t)) - ;; A few tests are broken in v 0.1.27. This function should be - ;; enabled to run tests in the next release. - ;; (replace 'check - ;; (lambda _ - ;; (let* ((tmpbin "tmp/bin") - ;; (gcc (which "gcc"))) - ;; (mkdir-p tmpbin) - ;; (symlink gcc (string-append tmpbin "/cc")) - ;; (setenv "PATH" (string-append tmpbin ":" (getenv "PATH"))) - ;; (invoke "./v" "test-fixed")) - ;; #t)) + (add-before 'check 'delete-failing-tests + ;; XXX As always, these should eventually be fixed and run. + (lambda _ + (for-each delete-file + '("vlib/v/gen/x64/tests/x64_test.v" + "vlib/v/tests/repl/repl_test.v" + "vlib/v/tests/valgrind/valgrind_test.v" + "vlib/v/tests/valgrind/strings_and_arrays.vv" + "vlib/v/tests/live_test.v" + "vlib/net/websocket/ws_test.v")) + #t)) + (replace 'check + (lambda* (#:key tests? #:allow-other-keys) + (let* ((bin "tmp/bin") + (gcc (which "gcc"))) + (when tests? + (mkdir-p bin) + (symlink gcc (string-append bin "/cc")) + (setenv "PATH" (string-append bin ":" (getenv "PATH"))) + (invoke "./v" "test-fixed"))) + #t)) (replace 'install (lambda _ (let* ((bin (string-append (assoc-ref %outputs "out") "/bin")) @@ -106,7 +119,13 @@ (commit vc-version))) (file-name (git-file-name "vc" vc-version)) (sha256 - (base32 "052gp5q2k31r3lci3rx4k0vy0vjdjva64xvrbbihn8lgmw63lc9f"))))))) + (base32 "052gp5q2k31r3lci3rx4k0vy0vjdjva64xvrbbihn8lgmw63lc9f"))))) + + ;; For the tests. + ("libx11" ,libx11) + ("node" ,node) + ("openssl" ,openssl) + ("sqlite" ,sqlite))) (home-page "https://vlang.io/") (synopsis "Compiler for the V programming language") (description -- cgit 1.4.1 From 6450070b9197516f84ff15d8c8653544ea1fb119 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Tue, 6 Oct 2020 09:44:25 +0300 Subject: gnu: vlang: Use cc-for-target. * gnu/packages/vlang.scm (vlang)[arguments]: Don't hardcode gcc in make-flags. In custom 'patch-makefile, don't hardcode gcc. --- gnu/packages/vlang.scm | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) (limited to 'gnu/packages/vlang.scm') diff --git a/gnu/packages/vlang.scm b/gnu/packages/vlang.scm index 6f6aa79ce5..659f9e01c7 100644 --- a/gnu/packages/vlang.scm +++ b/gnu/packages/vlang.scm @@ -1,6 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2020 Ryan Prior ;;; Copyright © 2020 Tobias Geerinckx-Rice +;;; Copyright © 2020 Efraim Flashner ;;; ;;; This file is part of GNU Guix. ;;; @@ -26,6 +27,7 @@ #:use-module (guix build-system gnu) #:use-module (guix git-download) #:use-module ((guix licenses) #:prefix license:) + #:use-module (guix utils) #:use-module (guix packages)) (define-public vlang @@ -43,15 +45,15 @@ (base32 "1rqi7cah5nq8aggrib9xvdpfjxq20li91svv0w9yny6nn1ag7snx")))) (build-system gnu-build-system) (arguments - '(#:make-flags - `("CC=gcc" - "TMPTCC=tcc" - ,(string-append "VC=" (assoc-ref %build-inputs "vc")) - "GITCLEANPULL=true" - "GITFASTCLONE=mkdir -p" - "TCCREPO=" - "VCREPO=" - "VERBOSE=1") + `(#:make-flags + (list (string-append "CC=" ,(cc-for-target)) + "TMPTCC=tcc" + (string-append "VC=" (assoc-ref %build-inputs "vc")) + "GITCLEANPULL=true" + "GITFASTCLONE=mkdir -p" + "TCCREPO=" + "VCREPO=" + "VERBOSE=1") #:phases (modify-phases %standard-phases (delete 'configure) @@ -59,7 +61,7 @@ (lambda _ (substitute* "Makefile" (("rm -rf") "true") - (("v self") "v -cc gcc cmd/v")) + (("v self") (string-append "v -cc " ,(cc-for-target) " cmd/v"))) #t)) (add-before 'check 'delete-failing-tests ;; XXX As always, these should eventually be fixed and run. -- cgit 1.4.1 From 527b27f14c110bda4c02bc3f6ee2efb1129458c4 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Tue, 6 Oct 2020 09:45:13 +0300 Subject: gnu: vlang: Correctly refer to output directories. * gnu/packages/vlang.scm (vlang)[arguments]: In custom 'install phase correctly refer to 'outputs'. --- gnu/packages/vlang.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gnu/packages/vlang.scm') diff --git a/gnu/packages/vlang.scm b/gnu/packages/vlang.scm index 659f9e01c7..e0b2e7bcfc 100644 --- a/gnu/packages/vlang.scm +++ b/gnu/packages/vlang.scm @@ -85,8 +85,8 @@ (invoke "./v" "test-fixed"))) #t)) (replace 'install - (lambda _ - (let* ((bin (string-append (assoc-ref %outputs "out") "/bin")) + (lambda* (#:key outputs #:allow-other-keys) + (let* ((bin (string-append (assoc-ref outputs "out") "/bin")) (tools (string-append bin "/cmd/tools")) (thirdparty (string-append bin "/thirdparty")) (vlib (string-append bin "/vlib")) -- cgit 1.4.1