LemmingAvalanche

Trying to set up Java dev. env.

Oct 28th, 2017
205
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. # Nix expression for Java development. Use `nix-shell --pure` and call
  2. # `eclipse` from that.
  3. let
  4. pkgs = import <nixpkgs> {};
  5. stdenv = pkgs.stdenv;
  6. in rec {
  7. environment = stdenv.mkDerivation rec {
  8. name = "dev-env";
  9. version = "1";
  10. src = ./.;
  11. buildInputs = [
  12. pkgs.maven
  13. pkgs.openjdk
  14. # Doesn’t work: get the error `error: undefined variable ‘nixpkgs’ at …`
  15. # nixpkgs.javaPackages.junit_4_12
  16. (pkgs.eclipses.eclipseWithPlugins {
  17. eclipse = pkgs.eclipses.eclipse-sdk-46;
  18. plugins = [
  19. # For JUnit, possibly some other stuff
  20. pkgs.eclipses.plugins.jdt
  21. ];
  22. })
  23. ];
  24. };
  25. }
Add Comment
Please, Sign In to add comment