Hello Fede, Eric, on [2017-02-07] at 15:15 Federico Beffa writes:
> Eric Bavier <[email protected]> writes: > >> On Mon, 06 Feb 2017 21:09:33 +0000 >> Myles English <[email protected]> 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? Thanks Eric for your suggestion. I made a start on this... >> 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)?). ...I came the same conclusion as Fede: it could be generalised. It is probably close to working for me (with respect to ghc) so I will keep going for now. I am not competent enough to generalise it but if someone else does I can help test it. Myles
