New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update dependencies so that Nix can install reflex #27
Comments
Hi @mayhewluke, I'm glad to hear that Reflex is working well for you! I've run into the same issue myself. Over the last few months, try-reflex has evolved from a beginner intro tool into something I'm using for several production projects myself. To that end, I've turned default.nix into something can be imported from other projects and used as a basis for other nix-based projects. So, in most of my projects, I have a submodule reference to try-reflex (often named "reflex-platform"), and then use that (and the nixpkgs it re-exports) as the basis for my nix expressions. Of course, it'd be great to have the standard nixpkgs support reflex, too, but there are a few reasons that I'd still want to use something like try-reflex, such as ensuring that the same version of packages like aeson are used in both ghc and ghcjs (it's built into ghcjs, but installed from hackage for ghc). Maybe we should discuss this further over email so that I can better understand your requirements and use them to inform future development on try-reflex, reflex, and reflex-dom. |
Might be worth having the discussion in a public place - like here? ... I suspect quite a few people are interested in this. (At the moment I'm using a hacked-up copy of the try-reflex default.nix which has its own nixpkgs dependency - I'd much prefer to use the same nixpkgs as the rest of my code). As for aeson, how important is it that the exact same version is used? |
I've been using try-reflex as a git submodule for a while now. Rather than changing default.nix, I simply import it from my project's default.nix. I can then re-override any packages I need to. I think it's pretty important to synchronize aeson, in particular. Rarely, but sometimes, the data format produced/consumed by aeson's template haskell functions changes, and I don't want to have to deal with those kinds of incompatibilities. |
Importing try-reflex's default.nix is the approach I've been taking as well: let
sysPkgs = import <nixpkgs> {};
reflexPkgs = import (sysPkgs.fetchgit {
url = git://github.com/ryantrinkle/try-reflex;
rev = "612f9d9f197633fb9e7f4fabfdca0d494794b42c";
sha256 = "1w6g2r819qky1d7pbjdvg6n8rj21ylxkf0mvl11l5f76k6h175ps";
}) {};
in
# ... That being said, Nix does support installing reflex/reflex-dom now via the Side note: Technically there are a few things that would still be good to do at that point. Mostly on the Nix side of things, but the one on the reflex side of things would be to release a version that is compatible with ghcjs-0.2.0 (improved-base). |
@mayhewluke Closing this out; if there's anything left that you still need, let me know! |
Reflex and reflex-dom are awesome. We want to use them in production. The trouble is, the only way I've found of successfully installing GHCJS + reflex/reflex-dom is to use try-reflex. Trying to install reflex via vanilla Nix (ie. no try-reflex) fails, since reflex's dependencies are not available in any Nix channel (nor are they even available in any
nixpkgs
revision, judging by the dozens of version shims in try-reflex).It's great that we can try reflex using try-reflex, but obviously that's not really fit for production. In order to use reflex in production we need a sane installation story that Just Works™ with the rest of the project.
Given that Nix appears to be the leading solution right now for "Making GHC and GHCJS Just Work™", making reflex/reflex-dom work with Nix would be ideal, IMHO. If there was a version of reflex/reflex-dom that worked with the NixOS-15.09 channel for example, it would make our Haskell Everywhere™ dreams come true.
The text was updated successfully, but these errors were encountered: