<div dir="ltr">Hi Peti,<br><br>Thanks for chiming in on this, was not aware cabal2nix's ghcjs functionality. This is great. There are some packages in haskellPackages (ghcjs-dom-jsffi) that are really only meant to be used with ghcjs. In this case would it be appropriate to somehow detect this, and use the "--compiler-ghcjs" flag during generation? Or is it better for us to resort to overriding all ghcjs specific packages on hackage in "pkgs/development/haskell-modules/configuration-ghcjs.nix" ? <br><br>The derivation below is pretty much useless for anyone using GHC (not a library nor executable, 0 deps specified). I imagine as GHCJS continues to grow, and hackage contains more 'ghcjs-only' packages, it will become onerous to continally override in configuration-ghcjs.nix (ghcjs-dom is also a good example of needing to do this).<br><br>```<br><div>"ghcjs-dom-jsffi" = callPackage ({ mkDerivation }:                                           mkDerivation {                                                                                                    pname = "ghcjs-dom-jsffi";                                                                            version = "0.5.0.2";                                                                                        sha256 = "... some hash ...";                                         </div><div>       isLibrary = false;                                                                                            isExecutable = false;                                                                                      description = "DOM library using JSFFI and GHCJS";                           </div><div>       license = stdenv.lib.licenses.mit;                                                                    hydraPlatforms = stdenv.lib.platforms.none;                                                }) {}; </div>







<p class="gmail-p1"><span class="gmail-s1">```  <br><br>Peti, is there a way we could generate two derivations (w/ and w/o the --ghcjs flag) and conditionally select the one we want based on the compiler (meaning ghcjs vs. latest ghc)? </span></p>Regards,<br><br>David</div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Nov 1, 2016 at 2:43 AM, Peter Simons <span dir="ltr"><<a href="mailto:simons@nospf.cryp.to" target="_blank">simons@nospf.cryp.to</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi David,<br>
<span class=""><br>
 > cabal2nix doesn't generate nix expressions that are sensitive to ghcjs.<br>
<br>
</span>the expressions in Nixpkgs target GHC 8.0.x, not GHCJS. If you want<br>
cabal2nix to generate expressions for GHCJS instead, then you'll just<br>
have to run it with the flag "--compiler=ghcjs". Builds generated by the<br>
Nix function haskell.packages.ghcjs.<wbr>callHackage do this automatically.<br>
<br>
Best regards,<br>
Peter<br>
<div class="HOEnZb"><div class="h5"><br>
______________________________<wbr>_________________<br>
Haskell-Cafe mailing list<br>
To (un)subscribe, modify options or view archives go to:<br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-<wbr>bin/mailman/listinfo/haskell-<wbr>cafe</a><br>
Only members subscribed via the mailman list are allowed to post.</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">Cell: 1.630.740.8204</div>
</div>