From a0bf73143b3662a0b902a06928977f6aeb97573c Mon Sep 17 00:00:00 2001 From: Danny Milosavljevic Date: Mon, 31 Jan 2022 15:14:25 +0100 Subject: gnu: ruby-mustache: Fix race condition. * gnu/packages/patches/ruby-mustache-1.1.1-fix-race-condition-tests.patch: New file. * gnu/packages/ruby.scm (ruby-mustache)[source]<#:origin>: Add it. * gnu/local.mk (dist_patch_DATA): Add it. --- gnu/packages/ruby.scm | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'gnu/packages/ruby.scm') diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm index 9d1a414914..1632ad092b 100644 --- a/gnu/packages/ruby.scm +++ b/gnu/packages/ruby.scm @@ -11386,7 +11386,16 @@ serves JavaScript, CoffeeScript, CSS, LESS, Sass, and SCSS.") (base32 "1l0p4wx15mi3wnamfv92ipkia4nsx8qi132c6g51jfdma3fiz2ch")))) (build-system ruby-build-system) (native-inputs - (list ruby-simplecov)) + `(("ruby-simplecov" ,ruby-simplecov) + ("test-patch" + ,(search-patch "ruby-mustache-1.1.1-fix-race-condition-tests.patch")))) + (arguments + `(#:phases + (modify-phases %standard-phases + (add-after 'unpack 'patch-tests + (lambda* (#:key inputs #:allow-other-keys) + (invoke "patch" "-p1" "--batch" "-i" + (assoc-ref inputs "test-patch"))))))) (synopsis "framework-agnostic way to render logic-free views") (description "Mustache is a framework-agnostic way to render logic-free views. -- cgit v1.2.3 From f1dfe9a27a345b3b534e0bf4bf26c1b819d9e769 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Wed, 2 Feb 2022 10:50:00 +0200 Subject: gnu: ruby-stackprof: Adjust skipped test on riscv64-linux. * gnu/packages/ruby.scm (ruby-stackprof)[arguments]: On riscv64-linux adjust the 'skip-dubious-test phase. --- gnu/packages/ruby.scm | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'gnu/packages/ruby.scm') diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm index 1632ad092b..4a7865a2f9 100644 --- a/gnu/packages/ruby.scm +++ b/gnu/packages/ruby.scm @@ -7,7 +7,7 @@ ;;; Copyright © 2015, 2016, 2017 Ben Woodcroft ;;; Copyright © 2017 Nikita ;;; Copyright © 2017, 2019, 2020, 2021 Marius Bakke -;;; Copyright © 2017, 2018, 2019, 2020, 2021 Efraim Flashner +;;; Copyright © 2017, 2018, 2019, 2020, 2021, 2022 Efraim Flashner ;;; Copyright © 2017, 2018, 2020, 2021 Tobias Geerinckx-Rice ;;; Copyright © 2017 Clément Lassieur ;;; Copyright © 2017, 2018, 2019 Christopher Baines @@ -7476,11 +7476,15 @@ navigation capabilities to @code{pry}, using @code{byebug}.") `(#:phases (modify-phases %standard-phases (add-before 'check 'skip-dubious-test - ;; This unreliable test can fail with "Expected 0 to be >= 1." (lambda _ - (substitute* "test/test_stackprof.rb" - (("def test_(cputime)" _ name) - (string-append "def skip_" name))))) + ,@(if (target-riscv64?) + ;; This unreliable test can fail with "Expected 32 to be <= 25." + '((substitute* "test/test_stackprof.rb" + ((".*assert_operator profile\\[:missed_samples.*") ""))) + ;; This unreliable test can fail with "Expected 0 to be >= 1." + '((substitute* "test/test_stackprof.rb" + (("def test_(cputime)" _ name) + (string-append "def skip_" name))))))) (add-before 'check 'build-tests (lambda _ (invoke "rake" "compile")))))) -- cgit v1.2.3 From cb1cb9de04b473e5e62e311b3e589253557c964b Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Wed, 2 Feb 2022 11:25:30 +0200 Subject: gnu: ruby-rubocop: Skip tests on riscv64-linux. * gnu/packages/ruby.scm (ruby-rubocop)[arguments]: Skip tests when building for riscv64-linux. --- gnu/packages/ruby.scm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'gnu/packages/ruby.scm') diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm index 4a7865a2f9..b242aa8295 100644 --- a/gnu/packages/ruby.scm +++ b/gnu/packages/ruby.scm @@ -7139,7 +7139,9 @@ run.") "0wjw9vpzr4f3nf1zf010bag71w4hdi0haybdn7r5rlmw45pmim29")))) (build-system ruby-build-system) (arguments - '(#:test-target "default" + `(#:test-target "default" + ;; TODO: Figure out why test hangs. + #:tests? ,(not (target-riscv64?)) #:phases (modify-phases %standard-phases (add-before 'check 'set-home -- cgit v1.2.3 From af57d1bf6c46f47d82dbc234dde1e16fa8634e9d Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Fri, 11 Feb 2022 15:58:56 +0100 Subject: gexp: does not honor (%guile-for-build). * guix/gexp.scm (computed-file-compiler): Default to (default-guile). That way, lowering of is not affected by the '%guile-for-build' parameter. (file-union): Add #:guile parameter and honor it. * gnu/packages/ruby.scm (ruby-tzinfo-data): Pass #:guile to 'file-union'. --- gnu/packages/ruby.scm | 11 +++++++++-- guix/gexp.scm | 18 ++++++++---------- 2 files changed, 17 insertions(+), 12 deletions(-) (limited to 'gnu/packages/ruby.scm') diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm index b242aa8295..121948b4fc 100644 --- a/gnu/packages/ruby.scm +++ b/gnu/packages/ruby.scm @@ -1,6 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2014, 2015 Pjotr Prins -;;; Copyright © 2014, 2015, 2016, 2017, 2021 Ludovic Courtès +;;; Copyright © 2014-2017, 2021-2022 Ludovic Courtès ;;; Copyright © 2014, 2015 Mark H Weaver ;;; Copyright © 2014, 2015 David Thompson ;;; Copyright © 2015, 2019 Ricardo Wurmus @@ -5717,7 +5717,14 @@ aware transformations between times in different time zones.") (uri "https://data.iana.org/time-zones/releases/tzcode2021a.tar.gz.asc") (sha256 (base32 - "1qhlj4lr810s47s1lwcvv1sgvg2sflf98w4sbg1lc8wzv5qxxv7g"))))))))) + "1qhlj4lr810s47s1lwcvv1sgvg2sflf98w4sbg1lc8wzv5qxxv7g"))))) + + ;; XXX: Explicitly depend on 'guile-final', which was previously + ;; implied via the '%guile-for-build' fluid but not explicit. + ;; TODO: Remove this argument on the next rebuild cycle. + #:guile (module-ref (resolve-interface + '(gnu packages commencement)) + 'guile-final))))) (synopsis "Data from the IANA Time Zone database") (description "This library provides @code{TZInfo::Data}, which contains data from the diff --git a/guix/gexp.scm b/guix/gexp.scm index 01dca902f7..8675e605a0 100644 --- a/guix/gexp.scm +++ b/guix/gexp.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021 Ludovic Courtès +;;; Copyright © 2014-2022 Ludovic Courtès ;;; Copyright © 2018 Clément Lassieur ;;; Copyright © 2018 Jan Nieuwenhuizen ;;; Copyright © 2019, 2020 Mathieu Othacehe @@ -597,13 +597,10 @@ This is the declarative counterpart of 'gexp->derivation'." ;; gexp. (match file (($ name gexp guile options) - (if guile - (mlet %store-monad ((guile (lower-object guile system - #:target target))) - (apply gexp->derivation name gexp #:guile-for-build guile - #:system system #:target target options)) - (apply gexp->derivation name gexp - #:system system #:target target options))))) + (mlet %store-monad ((guile (lower-object (or guile (default-guile)) + system #:target target))) + (apply gexp->derivation name gexp #:guile-for-build guile + #:system system #:target target options))))) (define-record-type (%program-file name gexp guile path) @@ -2087,7 +2084,7 @@ This is the declarative counterpart of 'text-file*'." (computed-file name build)) -(define (file-union name files) +(define* (file-union name files #:key guile) "Return a that builds a directory containing all of FILES. Each item in FILES must be a two-element list where the first element is the file name to use in the new directory, and the second element is a gexp @@ -2121,7 +2118,8 @@ This yields an 'etc' directory containing these two files." (mkdir-p (dirname (ungexp target))) (symlink (ungexp source) (ungexp target)))))) - files))))))) + files))))) + #:guile guile)) (define* (directory-union name things #:key (copy? #f) (quiet? #f) -- cgit v1.2.3 From 070cc513781bd847df1c95682164f4f50da88bbb Mon Sep 17 00:00:00 2001 From: Christopher Baines Date: Tue, 1 Mar 2022 18:40:30 +0000 Subject: gnu: ruby: Add ruby-3.1. * gnu/packages/ruby.scm (ruby-3.1): New variable. --- gnu/packages/ruby.scm | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'gnu/packages/ruby.scm') diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm index 121948b4fc..21b982d4a9 100644 --- a/gnu/packages/ruby.scm +++ b/gnu/packages/ruby.scm @@ -200,6 +200,20 @@ a focus on simplicity and productivity.") (base32 "0h2w2ms4gx2s96v3lzdr3add94bd2qqkhdjzaycmaqhg21rpf3jp")))))) +(define-public ruby-3.1 + (package + (inherit ruby-2.7) + (version "3.1.1") + (source + (origin + (method url-fetch) + (uri (string-append "http://cache.ruby-lang.org/pub/ruby/" + (version-major+minor version) + "/ruby-" version ".tar.xz")) + (sha256 + (base32 + "1akcl7vhmwfm6ybj7493kzy58ykh2r39ri9f4xfm2xmhg1msmvvs")))))) + (define-public ruby-2.5 (package (inherit ruby-2.6) -- cgit v1.2.3 From 0679c8fe976f3281e840f1332db60628351c9793 Mon Sep 17 00:00:00 2001 From: Maxime Devos Date: Fri, 4 Mar 2022 13:01:06 +0000 Subject: gnu: ruby-yard-with-tests: Run tests conditionally. * gnu/packages/ruby.scm (ruby-yard-with-tests)[arguments]: Remove #:tests? instead of unconditionally setting it to #t. [phases]: Delete trailing #t. [native-inputs]: Use new style. Modified-by: Maxim Cournoyer Signed-off-by: Maxim Cournoyer --- gnu/packages/ruby.scm | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) (limited to 'gnu/packages/ruby.scm') diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm index 21b982d4a9..c3c357d216 100644 --- a/gnu/packages/ruby.scm +++ b/gnu/packages/ruby.scm @@ -8279,8 +8279,8 @@ definitions.") (inherit ruby-yard) (name "ruby-yard-with-tests") (arguments - (substitute-keyword-arguments (package-arguments ruby-yard) - ((#:tests? _ #t) #t) + (substitute-keyword-arguments + (strip-keyword-arguments '(#:tests?) (package-arguments ruby-yard)) ((#:test-target _ "default") "default") ((#:phases phases '%standard-phases) `(modify-phases ,phases @@ -8293,13 +8293,8 @@ definitions.") (delete-file "Gemfile") ;; $HOME needs to be set to somewhere writeable for tests to ;; run. - (setenv "HOME" "/tmp")) - #t)))))) - (native-inputs - `(("ruby-rspec" ,ruby-rspec) - ("ruby-rack" ,ruby-rack) - ("ruby-redcloth" ,ruby-redcloth) - ("ruby-asciidoc" ,ruby-asciidoctor))))) + (setenv "HOME" "/tmp")))))))) + (native-inputs (list ruby-rspec ruby-rack ruby-redcloth ruby-asciidoctor)))) (define-public ruby-spectroscope (package -- cgit v1.2.3 From 9dfbf92f5551e216f6bd8585a658e35a328fcdbd Mon Sep 17 00:00:00 2001 From: Maxime Devos Date: Fri, 4 Mar 2022 13:01:07 +0000 Subject: gnu: ruby-ffi-rzmq: Honor TESTS?. * gnu/packages/ruby.scm (ruby-ffi-rzmq)[TESTS?]: Remove argument. [phases]{check}: Honor TESTS?. Signed-off-by: Maxim Cournoyer --- gnu/packages/ruby.scm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'gnu/packages/ruby.scm') diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm index c3c357d216..7481257625 100644 --- a/gnu/packages/ruby.scm +++ b/gnu/packages/ruby.scm @@ -7372,11 +7372,11 @@ library.") (base32 "14a5kxfnf8l3ngyk8hgmk30z07aj1324ll8i48z67ps6pz2kpsrg")))) (build-system ruby-build-system) - (arguments '(#:tests? #t - #:phases (modify-phases %standard-phases + (arguments '(#:phases (modify-phases %standard-phases (replace 'check - (lambda _ - (invoke "rspec")))))) + (lambda* (#:key tests? #:allow-other-keys) + (when tests? + (invoke "rspec"))))))) (native-inputs (list ruby-rspec)) (propagated-inputs -- cgit v1.2.3 From 21457fb31e2932673df36b769709b8deb05d2601 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Wed, 16 Mar 2022 15:07:59 +0200 Subject: gnu: ruby-stackprof: Adjust skipped test on powerpc-linux. * gnu/packages/ruby.scm (ruby-stackprof)[arguments]: On powerpc-linux adjust the 'skip-dubious-test phase. --- gnu/packages/ruby.scm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'gnu/packages/ruby.scm') diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm index 7481257625..acccc4d4c4 100644 --- a/gnu/packages/ruby.scm +++ b/gnu/packages/ruby.scm @@ -7500,7 +7500,8 @@ navigation capabilities to @code{pry}, using @code{byebug}.") (modify-phases %standard-phases (add-before 'check 'skip-dubious-test (lambda _ - ,@(if (target-riscv64?) + ,@(if (or (target-riscv64?) + (target-ppc32?)) ;; This unreliable test can fail with "Expected 32 to be <= 25." '((substitute* "test/test_stackprof.rb" ((".*assert_operator profile\\[:missed_samples.*") ""))) -- cgit v1.2.3