qfpl / reflex-tutorial

29 stars 11 forks source link

Can't setup anything on Arch Linux. #6

Closed hazelweakly closed 6 years ago

hazelweakly commented 6 years ago

Initial note: Arch Linux currently doesn't work super "out of the box" with installing nix. The AUR package is broken and the group install instructions don't work; however, as per this issue, running this command: curl https://nixos.org/nix/install | sh seems to be completely sufficient to install Nix.

I was able to install Nix using that method, then clone reflex-platform and run ./try-reflex just fine. I then attempted to clone this repo and that's where things started to break. (Just for clarity: My directory tree is ~/Code/reflex-platform/ and ~/Code/reflex-tutorial/)

Inside the root of reflex-tutorial, I ran nix-shell; it took several hours and eventually appeared to work. However I couldn't actually run ./ex00 because I didn't start the nix-shell in the right directory (I think. I get a string of errors where no modules are found at all and then a string of errors where no interfaces were loaded).

So I tried to run nix-shell inside of ~/Code/reflex-tutorial/code/exercises/ and that took several hours this time it would fail during the compilation of GHC (I think). As far as I can tell, it isn't using reflex-platform's caches anywhere at all.

I've tried to run ~/Code/reflex-platform/work-on ghcjs ./. while inside the directory ~/Code/reflex-tutorial/code/exercises/ and it fails with the error:

error: anonymous function at /home/jaredweakly/Code/reflex-tutorial/code/exercises/default.nix:1:1 called with unexpected argument ‘mkDerivation’, at /nix/store/wgg4rzg3hyywfd7b0917qmj4617rza7k-nixpkgs-32833c010ecf868826aaa3b60d322bf697f37134-src/pkgs/development/haskell-modules/make-package-set.nix:69:27
It looks like a problem occurred.  Please submit an issue at https://github.com/reflex-frp/reflex-platform/issues - include /home/jaredweakly/Code/reflex-platform/work-on.log to provide more information

At this point I'm somewhat at a loss at what to do to actually get anything working.

hazelweakly commented 6 years ago

Thanks to some chatting on the IRC I've realized that no caching will happen at all if I installed nix before installing the reflex-platform. As I needed to install Nix before I can install reflex-platform (due to the "brokenness" of arch linux with nix right now), that's what was causing all of the issues.

Further it seems there's a weird combination of perhaps not enough RAM, lack of swap, or weird storage space issues preventing me from successfully manually compiling everything which is why the nix-shell in the exercises folder was failing. So, I'm just going to close this issue.

I'll uninstall everything, purge Nix and all that, and then try again from the beginning once I figure out how to manually set up caching with or without reflex-platform. (Or more likely I'll get fed up and I'll just install a VM of some sort)

dalaing commented 6 years ago

I just pushed a change to the first exercise with more notes on setting up the binary caches explicitly, to try to provide a better baseline for folks working with all kinds of different setups.

It'll take about 10 minutes or so until it gets built by CI and then deployed, and you might need to hard refresh the page to get the change, but it might help.