From mboxrd@z Thu Jan 1 00:00:00 1970 From: Federico Beffa Subject: Re: Recursively propagate build-system 'arguments' to dependency packages? Date: Tue, 7 Feb 2017 16:15:21 +0100 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:60643) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cb7UL-0000f8-7d for help-guix@gnu.org; Tue, 07 Feb 2017 10:15:26 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cb7UK-0006oe-2u for help-guix@gnu.org; Tue, 07 Feb 2017 10:15:25 -0500 Received: from mail-ua0-x243.google.com ([2607:f8b0:400c:c08::243]:35479) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cb7UJ-0006mg-V6 for help-guix@gnu.org; Tue, 07 Feb 2017 10:15:24 -0500 Received: by mail-ua0-x243.google.com with SMTP id 96so10430028uaq.2 for ; Tue, 07 Feb 2017 07:15:22 -0800 (PST) List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+gcggh-help-guix=m.gmane.org@gnu.org Sender: "Help-Guix" To: ericbavier@openmailbox.org Cc: help-guix Eric Bavier writes: > On Mon, 06 Feb 2017 21:09:33 +0000 > Myles English wrote: > >> Trying to define a package to be compiled by ghc-8, and I think all of >> its dependencies must also be compiled by ghc-8 rather than ghc (which >> is version 7). This is easy to do with one package, e.g..: >> >> (define-module (my-packages myhaskell) >> ... >> #:use-module ((gnu packages haskell) #:prefix haskellmain:)) >> >> (define-public ghc-hunit8 >> (package >> (inherit haskellmain:ghc-hunit) >> (arguments `(#:haskell ,ghc-8)))) >> >> To do that recursively for all the dependencies seems Too Difficult so, >> is there a way to do something like --with-input=ghc=ghc-8 but with the >> build-system arguments? Perhaps doing the work in between the Bag and >> the Derivation? > > You may take a look at the 'package-with-python2' procedure in > guix/build-system/python.scm, which seems like it could be adapted to > work with haskell/ghc packages. Hi Eric, Myles, it seems that the only Python specific part of 'package-with-explicit-python' is the keyword '#:python'. What do you think of generalizing it by making it a function keyword argument and move the procedure to its own module (maybe (guix build-system utils)?). Regards, Fede