[Haskell-cafe] GHCJS Bad first impression
David Johnson
djohnson.m at gmail.com
Tue Nov 1 23:47:03 UTC 2016
Hi Peti,
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" ?
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).
```
"ghcjs-dom-jsffi" = callPackage ({ mkDerivation }:
mkDerivation {
pname =
"ghcjs-dom-jsffi";
version = "0.5.0.2";
sha256 = "... some hash
...";
isLibrary = false;
isExecutable = false;
description = "DOM library using JSFFI and GHCJS";
license = stdenv.lib.licenses.mit;
hydraPlatforms =
stdenv.lib.platforms.none;
}) {};
```
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)?
Regards,
David
On Tue, Nov 1, 2016 at 2:43 AM, Peter Simons <simons at nospf.cryp.to> wrote:
> Hi David,
>
> > cabal2nix doesn't generate nix expressions that are sensitive to ghcjs.
>
> the expressions in Nixpkgs target GHC 8.0.x, not GHCJS. If you want
> cabal2nix to generate expressions for GHCJS instead, then you'll just
> have to run it with the flag "--compiler=ghcjs". Builds generated by the
> Nix function haskell.packages.ghcjs.callHackage do this automatically.
>
> Best regards,
> Peter
>
> _______________________________________________
> Haskell-Cafe mailing list
> To (un)subscribe, modify options or view archives go to:
> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
> Only members subscribed via the mailman list are allowed to post.
>
--
Cell: 1.630.740.8204
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/haskell-cafe/attachments/20161101/42d6f65c/attachment.html>
More information about the Haskell-Cafe
mailing list