-
-
Notifications
You must be signed in to change notification settings - Fork 34
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
Add JDK8 support #19
base: master
Are you sure you want to change the base?
Add JDK8 support #19
Changes from 6 commits
fda4e2e
0561074
a07b44f
e46f963
42ded71
d86201f
41cc1c4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
use nix | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,6 +14,6 @@ jobs: | |
with: | ||
name: fzakaria | ||
signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}' | ||
- run: nix-build | ||
- run: nix-build -A mvn2nix | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. make sure we build the JDK11 version |
||
- run: ./result/bin/mvn2nix > dependencies.nix | ||
- run: nix-build -A buildMavenRepository --arg dependencies "import ./dependencies.nix" |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,4 @@ target/ | |
.idea/ | ||
*.iml | ||
result | ||
.direnv/ |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,6 +26,13 @@ $ nix run -f https://github.com/fzakaria/mvn2nix/archive/master.tar.gz --command | |
If you have [cachix](https://cachix.org/) installed, you can leverage our prebuilt binary. | ||
> cachix use fzakaria | ||
|
||
If your build builds only with **Java8** (the deafult is Java11); you can execute the alternative | ||
*mvn2nix* attribute. | ||
|
||
```bash | ||
$ nix run -f https://github.com/fzakaria/mvn2nix/archive/master.tar.gz mvn2nix-jdk8 --command mvn2nix | ||
``` | ||
Comment on lines
+29
to
+34
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @bbigras You will have to run the JDK8 command here. |
||
|
||
### Generating the Nix dependencies file | ||
|
||
In the same spirit of [bundix](https://github.com/nix-community/bundix), **mvn2nix** creates a Nix set with the | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,15 @@ | ||
self: super: { | ||
jdk = super.jdk11_headless; | ||
maven-jdk11 = super.maven.override { jdk = super.jdk11; }; | ||
|
||
mvn2nix = self.callPackage ./derivation.nix { }; | ||
maven-jdk8 = super.maven.override { jdk = super.jdk8; }; | ||
|
||
mvn2nix-jdk8 = self.callPackage ./derivation.nix { | ||
maven = self.maven-jdk8; | ||
}; | ||
|
||
mvn2nix-jdk11 = self.callPackage ./derivation.nix { | ||
maven = self.maven-jdk11; | ||
}; | ||
|
||
buildMavenRepository = self.callPackage ./maven.nix { }; | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,5 +16,5 @@ let | |
}; | ||
in pkgs.mkShell { | ||
name = "mvn2nix-shell"; | ||
buildInputs = with pkgs; [ jdk11_headless maven gh-md-toc]; | ||
buildInputs = with pkgs; [ jdk11_headless maven gh-md-toc ]; | ||
Comment on lines
18
to
+19
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nixfmt formatting |
||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just added direnv; unrelated to the fix.