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

heroku: 3.43.16 -> 7.5.7 #42869

Closed
wants to merge 2 commits into from
Closed

heroku: 3.43.16 -> 7.5.7 #42869

wants to merge 2 commits into from

Conversation

domenkozar
Copy link
Member

@domenkozar domenkozar commented Jul 2, 2018

$ nix-build -A heroku -I ~/dev
these derivations will be built:
  /nix/store/q29iva8k02b1gzkm63p7g131rjj4nrad-heroku-7.5.7-modules-7.5.7.drv
  /nix/store/nyjs1jjlq5a56jrk6q0adwsai9cl1ggq-heroku-7.5.7.drv
building '/nix/store/q29iva8k02b1gzkm63p7g131rjj4nrad-heroku-7.5.7-modules-7.5.7.drv'...
configuring
building
yarn config v1.8.0
success Set "yarn-offline-mirror" to "/nix/store/j0xn98mmavzazn7q0md8jc9jmfkkrmlp-offline".
Done in 0.03s.
yarn install v1.8.0
[1/4] Resolving packages...
[2/4] Fetching packages...
error An unexpected error occurred: "EACCES: permission denied, unlink '/nix/store/j0xn98mmavzazn7q0md8jc9jmfkkrmlp-offline/semver-5.5.0.tgz'".
info If you think this is a bug, please open a bug report with the information provided in "/build/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
builder for '/nix/store/q29iva8k02b1gzkm63p7g131rjj4nrad-heroku-7.5.7-modules-7.5.7.drv' failed with exit code 1
cannot build derivation '/nix/store/nyjs1jjlq5a56jrk6q0adwsai9cl1ggq-heroku-7.5.7.drv': 1 dependencies couldn't be built
error: build of '/nix/store/nyjs1jjlq5a56jrk6q0adwsai9cl1ggq-heroku-7.5.7.drv' failed

For some reason, yarn is unlinking the symlink which fails since it has no permission to do so.

Best workaround to use heroku seems to be #25983 (comment)

@srhb
Copy link
Contributor

srhb commented Jul 2, 2018

@GrahamcOfBorg eval

@zimbatm
Copy link
Member

zimbatm commented Jul 2, 2018

I think we should remove mkYarnPackage from nixpkgs as it's misleading maintainers that they can use it in nixpkgs. Because it does IFD it can't be used by hydra.

@domenkozar
Copy link
Member Author

@zimbatm this is why I've set hydraPlatforms = []; to avoid hydra builds.

@zimbatm
Copy link
Member

zimbatm commented Jul 2, 2018

If the package is not built by hydra then how about maintaining the definition outside of nixpkgs? It's not yet popular but https://github.com/nix-community/nur might be a good solution for that.

@domenkozar
Copy link
Member Author

That looses the convenience of nixpkgs such as nix-shell -p heroku, etc. It makes installing of heroku harder, so I'd like to understand the gain of splitting nix packages into another repo.

I understand that hydra not building is inconvenient already, but why make it even more so? :)

@matthewbauer
Copy link
Member

matthewbauer commented Jul 4, 2018

Why not use node2nix? It should just take adding heroku to the node-packages.json file & regenerating it.

Also it's important to remember that even if hydraPlatforms = [] a build is still attempted if another package depends on it.

@domenkozar
Copy link
Member Author

Not sure who mentioned it to me (@zimbatm?) but it also doesn't work with node2nix.

@zimbatm
Copy link
Member

zimbatm commented Jul 20, 2018

yes I have a branch here: https://github.com/zimbatm/nixpkgs/tree/heroku-7.5.10

It fails with npm ERR! network request to http://www.example.com/@heroku-cli%2fcolor failed, reason: getaddrinfo ENOTFOUND www.example.com www.example.com:80 because I suspect it doesn't get placed in the right location. I suspect that npm2nix doesn't understand the @team/package format and places the package in the wrong location.

@the-kenny
Copy link
Contributor

I would like to merge this as it works fine and brings heroku-cli back. We can always improve the implementation later.

Anyone against merging?

@the-kenny
Copy link
Contributor

Correction: It doesn't work for me :-)

% nix-shell -p heroku                                                                                              :(
these derivations will be built:
  /nix/store/hxg3sh70n762s3jxvp2r2956dfhnxdn7-heroku-7.5.7-modules-7.5.7.drv
  /nix/store/vbmka5djxps0wb5mzkw3w63gs253rca5-heroku-7.5.7.drv
building '/nix/store/hxg3sh70n762s3jxvp2r2956dfhnxdn7-heroku-7.5.7-modules-7.5.7.drv'...
configuring
building
yarn config v1.9.4
success Set "yarn-offline-mirror" to "/nix/store/rvvzns36hs08bkhg2b46p67w2bzqdm4j-offline".
Done in 0.03s.
yarn install v1.9.4
[1/4] Resolving packages...
[2/4] Fetching packages...
error An unexpected error occurred: "EACCES: permission denied, unlink '/nix/store/rvvzns36hs08bkhg2b46p67w2bzqdm4j-offline/semver-5.5.0.tgz'".
info If you think this is a bug, please open a bug report with the information provided in "/build/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
builder for '/nix/store/hxg3sh70n762s3jxvp2r2956dfhnxdn7-heroku-7.5.7-modules-7.5.7.drv' failed with exit code 1
cannot build derivation '/nix/store/vbmka5djxps0wb5mzkw3w63gs253rca5-heroku-7.5.7.drv': 1 dependencies couldn't be built
error: build of '/nix/store/vbmka5djxps0wb5mzkw3w63gs253rca5-heroku-7.5.7.drv' failed

@jdx
Copy link
Contributor

jdx commented Sep 17, 2018

stumbled across this (I'm the maintainer of the Heroku CLI). I don't know much about nixos, but you guys might be able to do something like we do for our homebrew formula.

That tarball is all the node js files needed to run heroku. If you either put a node bin on the PATH or map the shebang to node >=8 like we do in the formula that would be much easier I think. No need to mess with yarn.

@garbas
Copy link
Member

garbas commented Sep 17, 2018

@jdxcode whlie we have you here. first thank you for the pointers how to package heroku-cli. Is there also the option to disable self-update?

@jdx
Copy link
Contributor

jdx commented Sep 17, 2018

yes with HEROKU_DISABLE_AUTOUPDATE=1

@bobvanderlinden bobvanderlinden mentioned this pull request Sep 17, 2018
9 tasks
@bobvanderlinden
Copy link
Member

@jdxcode I've implemented your suggestion as an alternative to this PR here: #46804

@domenkozar
Copy link
Member Author

Thank you!

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

Successfully merging this pull request may close these issues.

None yet

9 participants