Comments (11)
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.
from reflex-platform.
But reflex-starter-app boils down to stack.yaml file set up to build reflex and ghcjs with stack instead of nix....
from reflex-platform.
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
HTH!
from reflex-platform.
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 try-reflex
compiling every single Haskell package all over again (I already have them as part of some other Haskell project via Stack).
from reflex-platform.
There is some effort to use stack, don't know if it's up-to-date though:
https://github.com/yamafaktory/reflex-starter
Other references:
#35
https://github.com/luigy/try-stack-reflex
https://github.com/reinh/reflex-dom-stack-demo
from reflex-platform.
So, right now it's not using stack at all?
from reflex-platform.
We don't also use Stack on top of Nix, though one might. The point of
Nix is that it's kind of like Stack, but taken to an extreme where
every system dependency is appropriately hashed and versioned. You
might have built some Haskell packages before outside of the Nix
environment, but they probably wouldn't be byte-for-byte identical to
the ones Nix is building (and it doesn't know about them anyway) and
so it doesn't matter.
Nix can be a bit of a pain with respect to how long things can take to
build when some basic dependency changes in a mostly-inconsequential
way, but in exchange, you get a rather extreme level of
reproducibility, which makes it nice in production as well as when
debugging (you can know that the thing you're running on your machine
is identical to the thing running in production and against which bugs
were reported).
Another thing which this hashing enables is that if the exact
packages you want have already been built by someone else, then you
can get them from a cache server and be quite assured that what you're
getting from the cache is exactly what would have been built if you
did it yourself.
On 12/08/2016, Saurabh Nanda [email protected] wrote:
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 istry-reflex
compiling every single Haskell package
all over again (I already have them as part of some other Haskell project
via Stack).You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
#69 (comment)
from reflex-platform.
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?
from reflex-platform.
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,
but that doesn't matter), I was having a nix build open that was using
ghcjs to produce real output and stack setup that was using "normal" ghc to
feed me with typechecking errors. In this way, you could even have
stack-with-ghc for intero while producing JS output separately...but that
just seems a bit crazy, doesn't it :)
On Fri, Aug 12, 2016 at 3:53 PM, Saurabh Nanda [email protected]
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?—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#69 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAsGhJ-bWfALTIEcZuuGhSsRV_FLVvu7ks5qfHr1gaJpZM4JjAbp
.
from reflex-platform.
@BartAdv not tried your links. Want to stick with the most supported/mainstream repo.
from reflex-platform.
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.
from reflex-platform.
Related Issues (20)
- Infinite recursion with `wasm` shell
- Problem starting the GHC Nix Shell HOT 5
- Can't build network depends using nix-build
- android build is broken on develop HOT 1
- network-3.1.1.1 and ghcjs HOT 2
- Support for ARM host builds of Android targets? HOT 1
- Issue building frontend on ARM64 Linux. HOT 3
- Adaptive icons for Android Oreo&up
- GHC version support HOT 2
- App Store rejects apk as being not zipalign processed HOT 2
- How to target Android API version 30 HOT 3
- try-reflex reports "cannot connect to socket" and "cannot coerce null to a string" HOT 2
- ListLike-4.7.2 compiling error using ghc_8_10 in develop branch HOT 1
- No ghc-8.10.4 for M1 macOS HOT 2
- Strange Hoogle error on opening a Nix shell HOT 3
- ghcjs-dom-jsffi breaks android builds HOT 2
- Caching for aarch64-linux? HOT 2
- "cannot connect to socket" on macOS aarch64 HOT 4
- Cannot bootstrap GHC on aarch64 HOT 3
- try-reflex script outdated or not setting up properly HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from reflex-platform.