Skip to content
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

make gradle2nix build using nix-prefetch-url sha256 #28

Closed
wants to merge 1 commit into from

Conversation

stites
Copy link

@stites stites commented Nov 23, 2020

While installing gradle2nix today, I came across this error:

hash mismatch in fixed-output derivation '/nix/store/0n8l74f6210fhprs6f4h1b9x3x1jbgf1-javax.servlet-api-3.1.0.pom':                                                                                                                                                                             
  wanted: sha256:0schkv7s1a5g6j06j6bcmr8fypd333kk4m4mswddzwm35vi0j4dk                                                                                                                                                                                                                           
  got:    sha256:06nwnhhgy4gg4q3bs2dx0311qabqcqcnfkbplmdi8350lgh2mbbg                                                                                                                                                                                                                           
cannot build derivation '/nix/store/b6k5p1zdqbji2ddpbk64fbgv9z2y39fq-javax.servlet-api-3.1.0.pom.drv': 1 dependencies couldn't be built                                                                                                                                                         

I've updated gradle-env.json with the output from nix-prefetch-url (which defaults to sha256):

$ nix-prefetch-url https://jcenter.bintray.com/javax/servlet/javax.servlet-api/3.1.0/javax.servlet-api-3.1.0.pom
path is '/nix/store/0n8l74f6210fhprs6f4h1b9x3x1jbgf1-javax.servlet-api-3.1.0.pom'
06nwnhhgy4gg4q3bs2dx0311qabqcqcnfkbplmdi8350lgh2mbbg

$ nix-prefetch-url https://repo.gradle.org/gradle/libs-releases/javax/servlet/javax.servlet-api/3.1.0/javax.servlet-api-3.1.0.pom
path is '/nix/store/0n8l74f6210fhprs6f4h1b9x3x1jbgf1-javax.servlet-api-3.1.0.pom'
06nwnhhgy4gg4q3bs2dx0311qabqcqcnfkbplmdi8350lgh2mbbg

I think this closes #26

@tadfisher
Copy link
Owner

So, gradle-env.json is generated by gradle2nix itself; I'd rather fix the problem that is causing gradle2nix to generate bad hashes.

@stites
Copy link
Author

stites commented Nov 23, 2020

👍 got it!

@stites stites closed this Nov 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Mismatching hashes and dependency versions for gradle2nix itself
2 participants