From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:470:142:3::10]:36896) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hcYJQ-0002yo-DC for guix-patches@gnu.org; Sun, 16 Jun 2019 12:47:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hcYFB-0007f7-Sc for guix-patches@gnu.org; Sun, 16 Jun 2019 12:43:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:56020) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hcYFB-0007es-P0 for guix-patches@gnu.org; Sun, 16 Jun 2019 12:43:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hcYFB-00041A-Kp for guix-patches@gnu.org; Sun, 16 Jun 2019 12:43:01 -0400 Subject: [bug#36249] [PATCH] gnu: ghc-clock: Break test dependency cycle differently. Resent-Message-ID: From: Robert Vollmert Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) Date: Sun, 16 Jun 2019 18:42:15 +0200 References: <20190616162902.28977-1-rob@vllmrt.net> In-Reply-To: <20190616162902.28977-1-rob@vllmrt.net> Message-Id: <443E9718-007C-4CE5-9CFB-11BAC6628A1B@vllmrt.net> 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 > On 16. Jun 2019, at 18:29, Robert Vollmert wrote: >=20 > Fixes https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D36084. >=20 > * 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 that > builds tests against ghc-clock-bootstrap and copies its result. > =E2=80=94 [=E2=80=A6] > @@ -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-bootstrap)) Is this an appropriate thing to do? Or should I export = ghc-clock-bootstrap and mark it hidden? > ("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 Oops, that must be introduced in some other patch of mine. (Bad keyboard = :-( ) > +(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")))) I missed adding the patch, see below. > + (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) >=20 diff --git a/gnu/packages/patches/ghc-clock-disable-library.patch = b/gnu/packages/patches/ghc-clock-disable-library.patch new file mode 100644 index 0000000000..4bf83cfaf1 --- /dev/null +++ b/gnu/packages/patches/ghc-clock-disable-library.patch @@ -0,0 +1,13 @@ + +diff -u a/clock.cabal b/clock.cabal +--- a/clock.cabal 2019-06-16 17:36:19.212000000 +0200 ++++ b/clock.cabal 2019-06-16 17:36:37.804000000 +0200 +@@ -61,6 +61,7 @@ +=20 +=20 +-library ++library disabled ++ buildable: False + if impl (ghc < 7.6) + build-depends: base >=3D 4.4 && <=3D 5, ghc-prim + build-depends: base >=3D 2 && <=3D 5 The library needs to be renamed because it conflicts with the existing = clock library otherwise. This feels a bit hacky, but I don=E2=80=99t currently see a more elegant = way to handle this. Ideas?