-
Notifications
You must be signed in to change notification settings - Fork 162
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
Is Nix a replacement for Stack? #69
Comments
Nix existed before stack! ;) Here's a blog post that talks about nix, stack and haskell: http://www.tweag.io/blog/stack-nix-portable-reproducible-builds |
If I understood this correctly, Nix is for handling the stuff that Stack doesn't handle. Nix will delegate Haskell related dependencies to Stack itself. However, why is |
There is some effort to use stack, don't know if it's up-to-date though: Other references: |
So, right now it's not using stack at all? |
We don't also use Stack on top of Nix, though one might. The point of Nix can be a bit of a pain with respect to how long things can take to Another thing which this hashing enables is that if the exact On 12/08/2016, Saurabh Nanda notifications@github.com wrote:
|
Well, then this brings me back to my original question. Without stack, how do I use this with an existing stack-ified project? With Intero as my editor? |
First of all, have you tried the starter reflex app I've linked to? Anyway, there are probably few options, I remember, once (before intero, On Fri, Aug 12, 2016 at 3:53 PM, Saurabh Nanda notifications@github.com
|
@BartAdv not tried your links. Want to stick with the most supported/mainstream repo. |
But reflex-starter-app boils down to stack.yaml file set up to build reflex and ghcjs with stack instead of nix.... |
Nix is a general package manager, which can be used to manage Haskell packages as well as system-level packages (and even the entire OS, in the case of NixOS). It's used here because it was the best way I could find to distribute binaries for everything you need to use Reflex (ghcjs, etc.). I use Nix because it gives me reproducible builds for everything, locking down the version of everything - system libraries, database software, etc. Since Nix already handles all my package management needs, I don't use stack, cabal-install, or other tools like that to do it. This repo is where I put any useful tools I've built relating to using Nix and reflex together. If you're working on a serious project with Reflex and you prefer not to use Nix, reflex-platform may not be too useful to you as it currently stands. However, if there are cross-package-manager support features I can add, I'll be happy to do so. I'm closing this issue because I don't think there's an immediate action to be taken, but please feel free to continue the discussion. |
It's not clear from the nix documentation when you're on a NixOS platform whether to use stack to run nix, or to use nix to run stack. Most thing seem to think that you're not on NixOS, so nix is just another tool, and that stack is in your profile PATH and you would use stack to run nix. But actually with NixOS, most times one should be using nix-shell to create "mutable" dev environments. So then stack can be brought into that environment. When you're already inside a nix-shell environment that has all the system (non-haskell) dependencies imported, why would you need stack's nix integration? It becomes irrelevant, stack can just be used without knowledge of the fact that it's in a nix environment. Then the whole software project would still be usable by your co-devs who are not using nix. I wrote the above not really in relation to reflex, but in general regarding the usage of stack and nix. |
Add macos instructions for setting environment variables for nix daemon
Show error message when backend crashes
I don't think this issue is related to reflex-platform, per se, but from a newbies perspective, I'm wondering why this isn't using Stack? Or is it using Stack along with Nix? Why is Nix required? Is Nix only a development time dependency, or will I need to install it on my production servers as well? Also, if I have a Haskell app which works with Stack, how do I build the UI in reflex? Do I need to "Nix-ify" my entire project?
The text was updated successfully, but these errors were encountered: