NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
17.37k stars 13.6k forks source link

boot-clj (pkgs.boot) tries to download JAR at runtime, cannot be used by builder #51200

Open charles-dyfis-net opened 5 years ago

charles-dyfis-net commented 5 years ago

Issue description

The boot package -- a build tool for Clojure -- cannot actually be used by any sandboxed Nix builder, because it tries to refer to a copy of its own JARs located in a Maven repository expected to be under the current user's home directory.

Ping: @ragnard

Steps to reproduce

let
  pkgs = import <nixpkgs> {};
  boot = pkgs.boot;
in
pkgs.runCommand "nixbld-bootclj-test-fail" {} ''
  ${boot}/bin/boot help
''

Fails as follows:

building '/nix/store/vxr79y1ck9vvkdmbvr1h5xkjda2g5770-nixbld-bootclj-test-fail.drv'...
Downloading https://github.com/boot-clj/boot/releases/download/2.7.2/boot.jar...
Exception in thread "main" java.net.UnknownHostException: github.com
        at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:184)
        at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
        at java.net.Socket.connect(Socket.java:589)
        at sun.security.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:666)
        at sun.security.ssl.BaseSSLSocketImpl.connect(BaseSSLSocketImpl.java:173)
        at sun.net.NetworkClient.doConnect(NetworkClient.java:180)
        at sun.net.www.http.HttpClient.openServer(HttpClient.java:463)
        at sun.net.www.http.HttpClient.openServer(HttpClient.java:558)
        at sun.net.www.protocol.https.HttpsClient.<init>(HttpsClient.java:264)
        at sun.net.www.protocol.https.HttpsClient.New(HttpsClient.java:367)
        at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(AbstractDelegateHttpsURLConnection.java:191)
        at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1156)
        at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1050)
        at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:177)
        at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1564)
        at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1492)
        at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:263)
        at java.net.URL.openStream(URL.java:1045)
        at Boot.download(Boot.java:176)
        at Boot.install(Boot.java:227)
        at Boot.main(Boot.java:248)
builder for '/nix/store/vxr79y1ck9vvkdmbvr1h5xkjda2g5770-nixbld-bootclj-test-fail.drv' failed with exit code 1
error: build of '/nix/store/vxr79y1ck9vvkdmbvr1h5xkjda2g5770-nixbld-bootclj-test-fail.drv' failed

Technical details

stale[bot] commented 4 years ago

Thank you for your contributions.

This has been automatically marked as stale because it has had no activity for 180 days.

If this is still important to you, we ask that you leave a comment below. Your comment can be as simple as "still important to me". This lets people see that at least one person still cares about this. Someone will have to do this at most twice a year if there is no other activity.

Here are suggestions that might help resolve this more quickly:

  1. Search for maintainers and people that previously touched the related code and @ mention them in a comment.
  2. Ask on the NixOS Discourse.
  3. Ask on the #nixos channel on irc.freenode.net.