-
Notifications
You must be signed in to change notification settings - Fork 22
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
Trouble getting jpm build to work on nix #68
Comments
I think @andrewchambers might have some insight into the situation, but I don't know how available he is recently. |
This is a common issue (I encounter it all the time on fresh installs).
Specifically, if you look at the linking command, it's trying to link against TL;DR in this specific case it's a packager issue, https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/interpreters/janet/jpm.nix already depends on the |
Looks like there are a couple of contributors to the |
I worked around this (and a few other related items) in my project's (pkgs.jpm.overrideAttrs (old: {
buildInputs = old.buildInputs ++ [ pkgs.makeWrapper ];
postInstall = "wrapProgram $out/bin/jpm --add-flags '--libpath=${pkgs.janet}/lib --ldflags=-L${pkgs.glibc}/lib --local'";
})) |
@xrd Is this still an issue for you? If so, did you try mattchrist's work-around? |
@xrd and @mattchrist , I just put together an initial version of janet2nix. Its pretty rough right now, but it provides a flake with a working janet and jpm packages (some recent commit). It also provides helper functions for compiling a janet executable and including jpm packages. @mattchrist , I based the jpm build on your suggestion here. There are a lot of missing features, and my knowledge of both nix and janet is pretty shallow, but I would love to collaborate in some way to improve it if either of y'all are up for it. |
I have janet and jpm installed on nix. I'm trying to build the example program from
https://github.com/bakpakin/littleserver
I think there is an issue where the root where jpm is installed thinks it should use a janet relative to jpm, rather than the janet binary. I cannot figure out the right combination of switches to tell jpm to use janet. And, it cannot find janet.h, as is obvious from the deps/build commands below. For example, I see this as an include path, which does not exist:
-I/nix/store/hfimcza6af6qd1944ngf22xqbiayrrw6-jpm-0.0.2/include/janet
. I thought I could use some combination of--janet-cflags
or--cflags
but I'm unclear whether I use the janet one or the regular c flags. And, I wonder if there is a better way (perhaps a top level environment variable) which better configures jpm.This command needs janet.h:
So, adding
--cflags
with a correct janet include path:But, then
jpm build
does not work. I assume I need to add the correct--ldflags
or--lflags
but is there a simpler way to get all this?The text was updated successfully, but these errors were encountered: