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
doesn't run on nixos #226
Comments
Additional info:
|
It would be helpful if we know how to build |
I ran
Maybe someone else can make sense of this error, I have no clue what's going on. In case you're curious about patchelf, that's how i did it: let
my-nixpkgs = import <nixpkgs> {};
my-glibc = my-nixpkgs.pkgs.glibc;
my-gcc = my-nixpkgs.gcc-unwrapped.lib;
my-gmp = my-nixpkgs.gmp;
in stdenv.mkDerivation {
name = "elm-test-shell";
buildInputs = with elmPackages; [
elm
elm-compiler
elm-make
elm-package
elm-reactor
elm-repl
];
shellHook = ''
export PATH="$PATH:${toString ./node_modules/.bin }"
patchelf --print-interpreter node_modules/elm-test/bin/elm-interface-to-json | grep -q nix || \
patchelf \
--debug \
--set-interpreter ${my-glibc}/lib/ld-linux-x86-64.so.2 \
--set-rpath "${concatStringsSep ":" (map (l: "${l}/lib") [my-gcc my-gmp my-glibc])}" \
node_modules/elm-test/bin/elm-interface-to-json
'';
} |
Can you post your attempted elm-interface-to-json nix file? My guess from the errors is that the nix file isn't specifying all the haskell dependencies that interface-to-json needs to build. |
@avh4 Yeah, it's just what |
@avh4 after taking another look at it, I figured it out. Updated the PR with a version that should build. I'm testing it right now. |
It's merged into nixpkgs now, so should be available in nixpkgs-unstable shortly and then you can simply use |
What's the status of this? I'm running NixOS unstable and still getting the error |
@manveru expression for elm-interface-to-json is working fine for me but I can't find it in nixpkgs repo for some reason. Was it removed? Anyway, this issue seems to be really tricky. I'm trying to make this work together with node2nix and frankly, I had to make a lot of dirty workarounds in order to run it. I still don't know how can I make reproducible definitions for a project where I'm testing it. I ended up replacing symlink created during installation to make it work. Does anyone have some success story with this in the end? Is there any public project when I can look for inspiration? |
Yes, it was removed with the upgrade to Elm 0.19. I'm still using 0.18 myself due to that (and things like the WebSockets package not having been ported when I tried it). |
sorry for hijacking this thread but what is your strategy even with 0.18 @manveru? are you using node2nix to generate elm-test dependencies with |
I don't use npm for it at all, since it's a Haskell library and only the binary happens to be distributed via npm, which of course means you'd have to patchelf it into submission.
|
I've got this working. Problem is with |
If anyone would like to post a sequence of commands that would result in a working elm-test on nixos 18.09, that would be greeat. I installed into ~/.npm-packages but I have the bad elmi-to-json problem. |
There is also NixOS/nixpkgs#45280. |
So, sources on slack tell me that we can expect an elm-test package very soon! In the meantime I was able to get elm-test to work by:
|
Wouldn't it make more sense to continue this on the nixpkgs issue NixOS/nixpkgs#45280? I'll post there my progress on creating a package there. |
Can I suggest adding an This makes it easy for people on unusual platforms to bypass the bundled binary, without messing with |
Sorry I haven't posted this earlier here (I couldn't find the issue). Please use this instead of NPM install I'll be working together with this and other upstreams including nixpkgs to find the best way for all the projects. |
@turboMaCk as elm-test now works on nixos using your tooling, can this issue be closed? |
@harrysarson I've packaged elm-test in nixpkgs |
Brilliant, thanks @turboMaCk |
elm-test
appears to rely on native binaries which don't work on nixos (and potentially other platforms).The text was updated successfully, but these errors were encountered: