From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:470:142:3::10]:34516) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hcY2e-0000xW-Cp for guix-patches@gnu.org; Sun, 16 Jun 2019 12:30:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hcY2c-0003qb-MO for guix-patches@gnu.org; Sun, 16 Jun 2019 12:30:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:56011) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hcY2c-0003pK-IZ for guix-patches@gnu.org; Sun, 16 Jun 2019 12:30:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hcY2c-0003fm-Bk for guix-patches@gnu.org; Sun, 16 Jun 2019 12:30:02 -0400 Subject: [bug#36249] [PATCH] gnu: ghc-clock: Break test dependency cycle differently. Resent-Message-ID: Received: from eggs.gnu.org ([2001:470:142:3::10]:34390) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hcY23-0000sv-Aj for guix-patches@gnu.org; Sun, 16 Jun 2019 12:29:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hcY21-0003Ca-C1 for guix-patches@gnu.org; Sun, 16 Jun 2019 12:29:27 -0400 Received: from mx1.mailbox.org ([2001:67c:2050:104:0:1:25:1]:18836) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hcY21-0003Ag-0c for guix-patches@gnu.org; Sun, 16 Jun 2019 12:29:25 -0400 From: Robert Vollmert Date: Sun, 16 Jun 2019 18:29:02 +0200 Message-Id: <20190616162902.28977-1-rob@vllmrt.net> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 36249@debbugs.gnu.org Cc: Robert Vollmert Fixes https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D36084. * gnu/packages/haskell-check.scm (ghc-tasty): Import ghc-clock-bootstrap directly from (gnu packages haskell). (ghc-clock-bootstrap): Move to... * gnu/packages/haskell.scm (ghc-clock-bootstrap): Here and update to 0.7.= 2. (ghc-clock): Inherit ghc-clock-bootstrap and build as test-only package t= hat builds tests against ghc-clock-bootstrap and copies its result. --- gnu/packages/haskell-check.scm | 26 +-------------------- gnu/packages/haskell.scm | 42 +++++++++++++++++++++++++++++----- 2 files changed, 37 insertions(+), 31 deletions(-) diff --git a/gnu/packages/haskell-check.scm b/gnu/packages/haskell-check.= scm index cfd986ed5e..21ea365aab 100644 --- a/gnu/packages/haskell-check.scm +++ b/gnu/packages/haskell-check.scm @@ -153,30 +153,6 @@ output file should be identical to the corresponding= @code{golden} file, which contains the correct result for the test.") (license license:expat))) =20 -;; This package builds `clock` without tests, since the tests rely on ta= sty -;; and tasty-quickcheck, which in turn require clock to build. -(define ghc-clock-bootstrap - (package - (name "ghc-clock-bootstrap") - (version "0.5.1") - (source - (origin - (method url-fetch) - (uri (string-append - "https://hackage.haskell.org/package/" - "clock/" - "clock-" version ".tar.gz")) - (sha256 - (base32 "1ncph7vi2q6ywwc8ysxl1ibw6i5dwfvln88ssfazk8jgpj4iyykw"))= )) - (build-system haskell-build-system) - (arguments `(#:tests? #f)) ;; Testing suite depends on tasty and - ;; tasty-quickcheck, which need clock to = build. - (home-page "https://hackage.haskell.org/package/clock") - (synopsis "High-resolution clock for Haskell") - (description "A package for convenient access to high-resolution clo= ck and -timer functions of different operating systems via a unified API.") - (license license:bsd-3))) - (define-public ghc-tasty (package (name "ghc-tasty") @@ -199,7 +175,7 @@ timer functions of different operating systems via a = unified API.") ("ghc-unbounded-delays" ,ghc-unbounded-delays) ("ghc-async" ,ghc-async) ("ghc-ansi-terminal" ,ghc-ansi-terminal) - ("ghc-clock-bootstrap" ,ghc-clock-bootstrap) + ("ghc-clock-bootstrap" ,(@@ (gnu packages haskell) ghc-clock-boot= strap)) ("ghc-wcwidth" ,ghc-wcwidth-bootstrap))) (home-page "http://documentup.com/feuerbach/tasty") (synopsis "Modern and extensible testing framework") diff --git a/gnu/packages/haskell.scm b/gnu/packages/haskell.scm index b9745b9661..35e89bb15c 100644 --- a/gnu/packages/haskell.scm +++ b/gnu/packages/haskell.scm @@ -1,4 +1,3 @@ - ;;; GNU Guix --- Functional package management for GNU ;;; Copyright =C2=A9 2015, 2016 Federico Beffa ;;; Copyright =C2=A9 2015 Sini=C5=A1a Bi=C4=91in @@ -4757,9 +4756,11 @@ or timeout period. This package provides alternat= ive functions which use the unbounded @code{Integer} type.") (license license:bsd-3))) =20 -(define-public ghc-clock +;; This package builds `clock` without tests, since the tests rely on ta= sty +;; and tasty-quickcheck, which in turn require clock to build. +(define ghc-clock-bootstrap (package - (name "ghc-clock") + (name "ghc-clock-bootstrap") (version "0.7.2") (source (origin @@ -4771,15 +4772,44 @@ unbounded @code{Integer} type.") (sha256 (base32 "07v91s20halsqjmziqb1sqjp2sjpckl9by7y28aaklwqi2bh2rl8"))= )) (build-system haskell-build-system) - (inputs - `(("ghc-tasty" ,ghc-tasty) - ("ghc-tasty-quickcheck" ,ghc-tasty-quickcheck))) + (arguments `(#:tests? #f)) ;; Testing suite depends on tasty and + ;; tasty-quickcheck, which need clock to build. (home-page "https://hackage.haskell.org/package/clock") (synopsis "High-resolution clock for Haskell") (description "A package for convenient access to high-resolution clo= ck and timer functions of different operating systems via a unified API.") (license license:bsd-3))) =20 +(define-public ghc-clock + (package + (inherit ghc-clock-bootstrap) + (name "ghc-clock") + (version "0.7.2") + (source + (origin + (method url-fetch) + (uri (string-append + "https://hackage.haskell.org/package/" + "clock/" + "clock-" version ".tar.gz")) + (sha256 + (base32 "07v91s20halsqjmziqb1sqjp2sjpckl9by7y28aaklwqi2bh2rl8")) + (patches + (search-patches + "ghc-clock-disable-library.patch")))) + (inputs + `(("ghc-clock-bootstrap" ,ghc-clock-bootstrap) + ("ghc-tasty" ,ghc-tasty) + ("ghc-tasty-quickcheck" ,ghc-tasty-quickcheck))) + (arguments + `(#:tests? #t + #:phases + (modify-phases %standard-phases + (replace 'install + (lambda* (#:key inputs outputs #:allow-other-keys) + (let ((bootstrap (assoc-ref inputs "ghc-clock-bootstrap"))) + (copy-recursively bootstrap (assoc-ref outputs "out")))))= ))))) + (define-public ghc-charset (package (name "ghc-charset") --=20 2.20.1 (Apple Git-117)