Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Nix all the things #19

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

Open
commandodev wants to merge 1 commit into joelburget:master
base: master
Choose a base branch
Loading
from commandodev:master
Open

Conversation

@commandodev
Copy link

@commandodev commandodev commented Feb 9, 2015

I've replaced haste with ghcjs specfic stuff in .cabal and added a shell.nix and a default.nix.

If you have a checkout of nixpkgs you should be able to run:

⇒ nix-shell -I . --pure # I have a symlink to my checkout of nixpkgs in cwd 
[nix-shell:~/dev/ghcjs/react-haskell]$ cabal configure --ghcjs
Warning: The package list for 'hackage.haskell.org' is 247.0 days old.
Run 'cabal update' to get the latest list of available packages.
Resolving dependencies...
Configuring react-haskell-1.3.0.0...
[nix-shell:~/dev/ghcjs/react-haskell]$ cabal build
Building react-haskell-1.3.0.0...
Preprocessing library react-haskell-1.3.0.0...
src/React/Anim.hs:9:8:
 Could not find module ‘Haste’
 Use -v to see a list of the files searched for.
src/React/Attrs.hs:6:8:
 Could not find module ‘Haste.JSON’
 Use -v to see a list of the files searched for.
src/React/Attrs.hs:7:8:
 Could not find module ‘Haste.Prim’
 Use -v to see a list of the files searched for.
src/React/Imports.hs:12:8:
 Could not find module ‘Haste.Foreign’
 Use -v to see a list of the files searched for.
src/React/Interpret.hs:6:8:
 Could not find module ‘Haste.DOM’
 Use -v to see a list of the files searched for.

So this seems to drop you into a sane nix-shell sans all the implementation changes you'd have to make to use ghcjs instead of haste :-)

Copy link
Owner

Thanks :) Going to leave this open for now, until I get a chance to look at the GHCJS stuff.

Copy link
Author

Sure thing. Leaving out the cabal changes could probably be made to work
for haste too, so give me a shout if you want to explore nix without ghcjs.
:-)
On 10 Feb 2015 21:58, "Joel Burget" notifications@github.com wrote:

Thanks :) Going to leave this open for now, until I get a chance to look
at the GHCJS stuff.


Reply to this email directly or view it on GitHub
#19 (comment)
.

Copy link
Owner

By the way, why did you symlink your nixpkgs to the current directory? Is that a typical way of working?

Copy link
Author

That's the way I do it. I like to have -I . so that you can symlink both
local packages under development and nixpkgs in one go. You can install
nixpkgs to a path globally (I think in ~/.nix-something) but I think is
more flexible as you can point different projects at different nixpkg
versions (e.g. for ghcjs).

On 28 February 2015 at 19:20, Joel Burget notifications@github.com wrote:

By the way, why did you symlink your nixpkgs to the current directory? Is
that a typical way of working?


Reply to this email directly or view it on GitHub
#19 (comment)
.

Regards,
Ben Ford
ben.fordnz@gmail.com
+447540722690

Copy link

Pardon me if I'm being daft, @Boothead , but this simply exposes react-haskell to nix, doesn't force it's usage, right?

Copy link
Author

You are correct @Aspidites. Nothing is forced, just consider it a strong hint ;-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /