From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Bavier Subject: Re: [PATCH 0/2] native-search-paths for GHC Date: Fri, 16 Oct 2015 08:35:09 -0500 Message-ID: <5a5b37456fcc5ef6312cd233b1723f8d@openmailbox.org> References: <1444166777-27350-1-git-send-email-ericbavier@openmailbox.org> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:45396) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zn5AL-00010t-9U for guix-devel@gnu.org; Fri, 16 Oct 2015 09:35:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zn5AI-0005NP-0C for guix-devel@gnu.org; Fri, 16 Oct 2015 09:35:25 -0400 Received: from smtp12.openmailbox.org ([62.4.1.46]:55109) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zn5AH-0005N8-N8 for guix-devel@gnu.org; Fri, 16 Oct 2015 09:35:21 -0400 Received: from www.openmailbox.org (openmailbox-b2 [10.91.69.220]) by mail2.openmailbox.org (Postfix) with ESMTP id 597EB2AC1702 for ; Fri, 16 Oct 2015 15:35:11 +0200 (CEST) In-Reply-To: <1444166777-27350-1-git-send-email-ericbavier@openmailbox.org> 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: Guix-devel Hello Guix, With all the Haskell packages that have made their way to the list, I was wondering if anyone had any further comments on these patches. `~Eric On 2015-10-06 16:26, ericbavier@openmailbox.org wrote: > From: Eric Bavier > > The first of these patches lets search-path-as-list function correctly > when a > pattern is given and the 'directory file type is specified. > > The second adds a native-search-paths field to our ghc package. It > modifies > our haskell-build-system to install a package-specific package database > with > each haskell library. GHC insists on a binary package cache file > called > 'package.cache' to be in each directory listed in GHC_PACKAGE PATH, so > we > uniquely name the package database directories, and use a file-pattern > to add > those to GHC_PACKAGE_PATH. > > The benefit of this over the current situation is that one gets the > benefit of > `guix package --search-paths`. Currently, after installing ghc > packages, the > user needs to know to manually add > ~/.guix-profile/lib/ghc-7.8.4/package.conf.d to their GHC_PACKAGE_PATH. > GHC > package recipes would no longer need to propagate runtime dependencies, > and > 'guix environment' also works nicely out-of-the-box:: > > $ guix environment --ad-hoc ghc ghc-attoparsec > $ ghc-pkg list > /gnu/store/...-ghc-mtl-2.1.3.1/lib/ghc-7.8.4/ghc-mtl-2.1.3.1.conf.d > base-4.7.0.2 > ghc-prim-0.3.1.0 > integer-gmp-0.5.1.0 > mtl-2.1.3.1 > rts-1.0 > transformers-0.3.0.0 > /gnu/store/...-ghc-regex-base-0.93.2/lib/ghc-7.8.4/ghc-regex-base-0.93.2.conf.d > array-0.5.0.0 > base-4.7.0.2 > bytestring-0.10.4.0 > ... > /gnu/store/4vvmngz1w8ccm7v7mk4f4dxk45834464-ghc-attoparsec-0.13.0.0/lib/ghc-7.8.4/ghc-attoparsec-0.13.0.0.conf.d > array-0.5.0.0 > attoparsec-0.13.0.0 > ... > > Though, as you can see in this example, libraries may be listed more > than > once. As far as I can tell at this point, that is just an aesthetic > detail. > > Future work might involve filtering build-only library dependencies > from the > generated package database. We could probably also remove the ghc > package > database creation during profile generation. > > I'd be insterested in hearing others' thoughts on this approach. > > Eric Bavier (2): > utils: Have search-path-as-list pattern search for directories. > gnu: ghc: Add GHC_PACKAGE_PATH native search path. > > gnu/packages/haskell.scm | 6 +++ > guix/build/haskell-build-system.scm | 100 > +++++++++++++++++++++++++++++------- > guix/build/utils.scm | 9 ++-- > guix/search-paths.scm | 6 --- > 4 files changed, 93 insertions(+), 28 deletions(-) -- `~Eric