Skip to content
This repository has been archived by the owner on Nov 25, 2024. It is now read-only.

Add sample nix expression in README #6

Open
triblix opened this issue Oct 3, 2015 · 1 comment
Open

Add sample nix expression in README #6

triblix opened this issue Oct 3, 2015 · 1 comment

Comments

@triblix
Copy link

triblix commented Oct 3, 2015

I wanted to fix the broken NixOS junit package but the README only describes how to generate the project-info.json file

I tried replacing the junit expression in all-packages.nix with

junit = buildMaven ../development/libraries/java/junit/project-info.json ;

and nix happily built the maven dependencies but unfortunately this did not build junit.

$ nix-build -A junit
these derivations will be built:
  /nix/store/xmzd1x46zv5yjp5wfp9qhkclgl7nycg2-junit-4.12.jar.drv
building path(s) ‘/nix/store/vzazijmzb9v7grxfrbdzmjc50ypslzin-junit-4.12.jar’
unpacking sources
unpacking source archive /nix/store/02x8ms0rwcfpgcifdav5na4c6bc2sinb-junit
source root is junit
patching sources
configuring
no configure script, doing nothing
building
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.049 s
[INFO] Finished at: 2015-10-03T22:09:43+00:00
[INFO] Final Memory: 7M/303M
[INFO] ------------------------------------------------------------------------
[ERROR] The goal you specified requires a project to execute but there is no POM in this directory (/tmp/nix-build-junit-4.12.jar.drv-0/junit). Please verify you invoked Maven from the correct directory. -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MissingProjectException
builder for ‘/nix/store/xmzd1x46zv5yjp5wfp9qhkclgl7nycg2-junit-4.12.jar.drv’ failed with exit code 1
error: build of ‘/nix/store/xmzd1x46zv5yjp5wfp9qhkclgl7nycg2-junit-4.12.jar.drv’ failed

Thanks in advance!

@schmittlauch
Copy link
Member

I found a blog post trying to describe building a package with mvn2nix an buildMaven, but haven't verified it yet: https://ww.telent.net/2017/5/10/building_maven_packages_with_nix

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants