jlesquembre / clj-nix

Nix helpers for Clojure projects
https://jlesquembre.github.io/clj-nix/
Eclipse Public License 2.0
139 stars 20 forks source link

Help with a project #60

Closed IGJoshua closed 1 year ago

IGJoshua commented 1 year ago

Hey, I really like the project! I've been getting started using it with a little toy project I made ages ago before moving on to packaging more complex applications.

The project can be found here: https://github.com/IGJoshua/notes

I get issues while trying to build it, saying it can't find a particular file. I'm not entirely sure how this expects me to put the files. At the moment I'm producing a target/cljnotes-DEV.jar, although I've also tried target/cljnotes.jar and it also fails with the same error.

I've also tried moving around the :gen-class clause because I was thinking it could've been that based on the logs, but that seems unlikely given it's saying that it can't find a file.

$ nix build .#cljnotes-clj
error: builder for '/nix/store/dfykbsmwfssa32z2hfy7iw90cchngyxz-cljnotes-DEV.drv' failed with exit code 1;
       last 10 log lines:
       > building
       > Picked up JAVA_TOOL_OPTIONS: -Duser.home=/nix/store/hy9gsh7h1v5rz6kaam1ic8ar013qpdmn-clj-cache
       > check notes.core for :gen-class
       > Picked up JAVA_TOOL_OPTIONS: -Duser.home=/nix/store/hy9gsh7h1v5rz6kaam1ic8ar013qpdmn-clj-cache
       > Picked up JAVA_TOOL_OPTIONS: -Duser.home=/nix/store/hy9gsh7h1v5rz6kaam1ic8ar013qpdmn-clj-cache
       > Execution error (IOException) at java.lang.ProcessImpl/forkAndExec (ProcessImpl.java:-2).
       > error=2, No such file or directory
       >
       > Full report at:
       > /tmp/clojure-9699403785300180062.edn
       For full logs, run 'nix log /nix/store/dfykbsmwfssa32z2hfy7iw90cchngyxz-cljnotes-DEV.drv'.

Do you have any thoughts on how I could fix this?

jlesquembre commented 1 year ago

Thanks for your nice words, and nice to see you using clj-nix. I've used some of your Clojure libraries in the past, happy to help you back :)

I opened a PR IGJoshua/notes#1 with a fix and some comments. Let me know if something is not clear, or if you have any other issues or suggestions for clj-nix.

IGJoshua commented 1 year ago

Thanks so much for the help! Looking back this should've been pretty obvious.