Closed JonathanLorimer closed 1 year ago
Not sure if clj-nix
has anything to do with that error, are you following clojure naming requirements: https://clojure.org/guides/learn/namespaces#_loading ?
Does your program work outside of the nix build? If yes, then it's an issue with clj-nix
. In that case I'd appreciate if you can share an example to reproduce the error.
@jlesquembre Thanks for the quick response. Here is the repo that I am packaging, I assume it works without clj-nix
since its a well used project https://github.com/jepsen-io/maelstrom/blob/main/project.clj#L12 (I have linked to the dependency that is causing issues).
I am just putting together a repo right now, will post again once its ready.
Here is the repo you can run nix build github:JonathanLorimer/maelstrom.nix#maelstrom -L
to see the errors.
nix build github:JonathanLorimer/maelstrom.nix#maelstrom-lock -L --rebuild
this command will print out the generated deps-lock.json.
@JonathanLorimer Thanks for sharing the project, I'll try to build it myself with clj-nix
. It's a nice example, since maelstrom
has a CLI interface.
@jlesquembre Sounds good, thanks for looking into this! Fwiw I have very little experience with clojure / lein, so I may be missing something very obvious here. Also the fact that I am trying to generate the lock as a separate nix derivation may be causing an issue.
Something not clear in the documentation is that for leiningen projects a custom build command is needed. For maelstrom
some extra customization is needed, I opened a PR to fix the build:
https://github.com/JonathanLorimer/maelstrom.nix/pull/1
I tested only the CLI test commands, let me know if you see any errors in the generated package.
@jlesquembre I am still running into some issues. Is it possible that there is an implicit runtime dependency on lein
or clojure
or something like that?
https://github.com/JonathanLorimer/maelstrom.nix/pull/1#issuecomment-1625778285
Closing, fixed in https://github.com/JonathanLorimer/maelstrom.nix/pull/1 Feel free to re-open (or open a new one) if you still have problems.
I end up with this error, I'm not sure if the issue is with
clj-nix
or some upstream dependency, but I am getting this error: