From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: [PATCH 3/3] gnu: Add ghc. Date: Sun, 01 Mar 2015 15:55:46 +0100 Message-ID: <87385oephp.fsf@gnu.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:59362) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YS5Hc-0005yA-PM for guix-devel@gnu.org; Sun, 01 Mar 2015 09:55:53 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YS5HZ-0007le-Eo for guix-devel@gnu.org; Sun, 01 Mar 2015 09:55:52 -0500 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:33706) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YS5HZ-0007la-B5 for guix-devel@gnu.org; Sun, 01 Mar 2015 09:55:49 -0500 In-Reply-To: (Federico Beffa's message of "Sun, 1 Mar 2015 13:44:57 +0100") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: Federico Beffa Cc: Guix-devel Federico Beffa skribis: > I do not create a ready to use bootstrap package because the resulting > store entry amounts to 940MB! I just keep an unmodified fixed version > tarball (68MB) and take care to patch it in custom phases of the final > GHC package. Sounds good. > From c39f2fa29bd614227f501cb83f72e2aa827a9123 Mon Sep 17 00:00:00 2001 > From: Federico Beffa > Date: Wed, 25 Feb 2015 20:20:24 +0100 > Subject: [PATCH] gnu: Add ghc. > > * gnu/packages/haskell.scm: New file. [...] > +;; 43 tests out of 3965 fail. > +;; > +;; Most of them do not appear to be serious: > +;; > +;; - some tests generate files referring to "/bin/sh" and "/bin/ls". I'v= e not > +;; figured out how these references are generated. > +;; > +;; - Some tests allocate more memory than expected (ca. 3% above upper l= imit) > +;; > +;; - Some tests try to load unavailable libriries: Control.Concurrent.ST= M, > +;; Data.Vector, Control.Monad.State. > +;; > +;; - Test posix010 tries to check the existence of a user on the system: > +;; getUserEntryForName: does not exist (no such user) All these seem workable: #1 and #4 should be easily fixed by adjusting to the specifics of our build environment, and #2 and #3 might just need to be skipped. But let=E2=80=99s get this patch in first. :-) [...] > + (substitute* (list "testsuite/timeout/Makefile" > + "testsuite/timeout/timeout.py" > + "testsuite/timeout/timeout.hs" > + "testsuite/tests/rename/prog006/Setup.lhs" > + "testsuite/tests/programs/life_space_leak= /life.test") > + (("/bin/sh") (which "sh")) > + (("/bin/rm") "rm")) Perhaps (find-files "testsuite" ".*") would be enough? > + ;; We need to set the locale for the tests to produce results > + ;; identical to the expected ones. s/set the locale/install a UTF-8 locale/ (presumably.) [...] > + (alist-cons-before > + 'configure 'install-bin This phase installs bootstrap binaries to $out/bin and adds them to $PATH, right? Wouldn=E2=80=99t it be enough to install them to $TMPDIR/bin= and add that to $PATH? > + (lambda* (#:key inputs outputs #:allow-other-keys) > + (let* ((binaries > + (list > + "./utils/ghc-pwd/dist-install/build/tmp/ghc-pwd" > + "./utils/hpc/dist-install/build/tmp/hpc" > + "./utils/haddock/dist/build/tmp/haddock" > + "./utils/hsc2hs/dist-install/build/tmp/hsc2hs" > + "./utils/runghc/dist-install/build/tmp/runghc" > + "./utils/ghc-cabal/dist-install/build/tmp/ghc-cab= al" > + "./utils/hp2ps/dist/build/tmp/hp2ps" > + "./utils/ghc-pkg/dist-install/build/tmp/ghc-pkg" > + "./utils/unlit/dist/build/tmp/unlit" > + "./ghc/stage2/build/tmp/ghc-stage2")) Could we just list base names and do (append-map (lambda (program) (find-files "." (string-append "^" program "$"))) '("ghc-pwd" "hpc" ...)) > + (ld-so (string-append (assoc-ref inputs "libc") > + "/lib/ld-linux-x86-64.so.2")) Please use ,(glibc-dynamic-linker) for the base name. [...] > + (system* (string-append (getcwd) "/configure") > + (string-append "--prefix=3D" ghc-bootstrap-pr= efix) > + (string-append "--with-gmp-libraries=3D" gmp-= lib) > + (string-append "--with-gmp-includes=3D" gmp-i= nclude)) > + (setenv "PATH" > + (string-append (getenv "PATH") ":" > + ghc-bootstrap-prefix "/bin")) > + (zero? (system* "make" "install"))))) Perhaps move =E2=80=9Cmake install=E2=80=9D to a separate phase? Thanks for the great work! Eventually we should move Hugs to haskell.scm as well. Ludo=E2=80=99.