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
Jupyterhub #31871
Jupyterhub #31871
Conversation
buildPythonPackage rec { | ||
pname = "jupyterhub"; | ||
version = "0.8.1"; | ||
name = "${pname}-${version}"; |
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.
Since 78ed9da name defaults to pname + version so this is not required anymore.
buildPythonPackage rec { | ||
pname = "python-oauth2"; | ||
version = "1.0.1"; | ||
name = "${pname}-${version}"; |
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.
Same here, pname not required.
sha256 = "0a1d0qnlgm07wq9r9bbm5jqkqry73w34m87p0141bk76lg7bb0sm"; | ||
}; | ||
|
||
doCheck = false; |
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.
Please add a comment why you are skipping tests
traitlets | ||
]; | ||
|
||
doCheck = false; |
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.
Please add a comment why you are skipping tests (or even better, run the tests)
|
||
buildInputs = | ||
[ | ||
requests |
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.
requests
should probably also be in propagatedBuildInputs
.
buildInputs = | ||
[ | ||
requests | ||
nodejs-8_x |
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.
This looks a bit funky to me. Don't you need any nodePackages
?
sha256 = "100cf18d539802807a45450d38fefbb376cf1c810f3b1b31be31638829a5c69c"; | ||
}; | ||
|
||
preBuild = "mkdir .home; HOME=$PWD/.home"; |
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.
I would replace this with HOME=`mktemp -d`
Please squash the commits and change commit messages according to https://github.com/NixOS/nixpkgs/blob/master/.github/CONTRIBUTING.md |
Will sort it by the weekend hopefully! |
I made the suggested changes, fixed a problem with |
@GrahamcOfBorg eval (sorry, master was broken and is now fixed) |
@ixxie @FRidh I made a service around jupyterhub here. I'm not going to make a pull-request as I believe two open requests is already more than enough but feel free to incorporate my changes or if you want, I can add my changes to your PR. |
@adisbladis @FRidh - after much discussion and wrangling with a complicated commit history, I think I managed to address the required fixes to #31950 and pushed them back into this PR. Hopefully its now in order. Note that squashing was not as easy in all cases without losing contribution history, so this is about as good as I can get it. @aborsu - that is awesome but I think that should become a separate PR - one for the package and one for the module -no? |
@ixxie, I'll get started as soon as this gets merged. |
@adisbladis @FRidh - I refreshed this once again since it went stale. |
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.
Python part looks good to me. What is needed:
- approval from a node package set maintainer
- squash and name the commits according to the contributing guidelines
cc @svanderburg regarding Node package set |
@ixxie if I can give you a little hand. git rebase --interactive 6f5cf6b^ Will start an intarctive rebase just before your first commit. pick 6f5cf6b90af Added myself (ixxie) as maintainer.
s 6d3515bc869 Initial commit of the Jupyterhub package (not building).
s a10221a7e82 First draft of pythonPackages.python-oauth2
s ae159093a6b Got python-oauth2 to build by setting doCheck = false.
s da7f0a10832 Got jupyterhub to build by tweaking depenendencies and phases.
s 77f31d6b1ea Style cleanup for jupyterhub python module.
s 2301b3871eb jupyterhub: init at 0.8.1
pick 94ef6d2c661 pythonPackages.pamela: fix resolution of libpam.so
d 8497568a75d jupyterhub: various tweaks/fixes
d 66a5b853cad Rebuilt Node packages.
d cd1e91a876f Rebuilt node packages again.
# Rebase 9be54c61a2c..cd1e91a876f onto 9be54c61a2c (11 commands)
#
# Commands:
# p, pick = use commit
# r, reword = use commit, but edit the commit message
# e, edit = use commit, but stop for amending
# s, squash = use commit, but meld into previous commit
# f, fixup = like "squash", but discard this commit's log message
# x, exec = run command (the rest of the line) using shell
# d, drop = remove commit
# We are squashing all of the commits about jupyterhub together notes:
This should go smoothly, and you should see this:
Delete everything but the last line (This will be your final commit message). Once it is done, we will cherry-pick @cstrahan's commit. git-cherry pick df4b90b Of course you get conflicts. (Don't worry) cd pkgs/development/node-packages/
./generate.sh Once this is over, add it and continue the cherry-pick: git add node-packages-v6.nix
git cherry-pick --continue and voilà ! |
@aborsu thanks for the tips! I followed your instructions, more or less, and it looks better at least. Hopefully @FRidh and @adisbladis approve. |
@@ -1,4 +1,4 @@ | |||
# This file has been generated by node2nix 1.5.1. Do not edit! |
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.
@ixxie If you had followed my instructions this would not be here. (Just saying ;) )
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.
Dang! I did regenerate the files though, so I am not sure what went wrong...
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.
Note the only deviation I made from your instructions is not to drop "jupyterhub: various tweaks/fixes" because it included some stuff that was needed for this to work. Then running ./generate.sh
produced both a new node-packages-v4.nix
and a node-packages-v6.nix
.
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.
@ixxie Your version of the commit with the message 'jupyterhub: various tweaks/fixes' had the commit starting with 8497568a75d while the one I told you to cherry-pick df4b90b was the one made by cstrahan.
In your version, you have changes to multiple files which are actually not the ones made by cstrahan but happened when you tried to deal with the original rebase.
If you go look at cstrahan's original commit df4b90b you will notice that he only modified 4 files
- composition-v4.nix (which is only a newline at end of file.)
- node-packages-v6.json (need to keep)
- node-packages-v6.nix (Which is generated)
- jupyterhub/default.nix (where he uses the node packages)
All of the other file changed in your commit come from the rebase and should not be there.
I suggest using |
@GrahamcOfBorg build python2.pkgs.jupyterhub python3.pkgs.jupyterhub |
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.
Failure for system: x86_64-darwin
Package ‘linux-pam-1.3.0’ in /Users/graham/nix-borg/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-zoidberg/pkgs/os-specific/linux/pam/default.nix:53 is not supported on ‘x86_64-darwin’, refusing to evaluate.
a) For `nixos-rebuild` you can set
{ nixpkgs.config.allowBroken = true; }
in configuration.nix to override this.
b) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
{ allowBroken = true; }
to ~/.config/nixpkgs/config.nix.
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.
Failure for system: x86_64-linux
/tmp/nix-build-python3.6-jupyterhub-0.8.1.drv-0/jupyterhub-0.8.1
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/pr65n8611y7y5hknfcdkkdnni934z4dv-python3.6-jupyterhub-0.8.1
strip is /nix/store/mdyy001q67hiks0g24ra53z7ckm4jfr4-binutils-2.28.1/bin/strip
stripping (with command strip and flags -S) in /nix/store/pr65n8611y7y5hknfcdkkdnni934z4dv-python3.6-jupyterhub-0.8.1/lib /nix/store/pr65n8611y7y5hknfcdkkdnni934z4dv-python3.6-jupyterhub-0.8.1/bin
patching script interpreter paths in /nix/store/pr65n8611y7y5hknfcdkkdnni934z4dv-python3.6-jupyterhub-0.8.1
checking for references to /tmp/nix-build-python3.6-jupyterhub-0.8.1.drv-0 in /nix/store/pr65n8611y7y5hknfcdkkdnni934z4dv-python3.6-jupyterhub-0.8.1...
wrapping `/nix/store/pr65n8611y7y5hknfcdkkdnni934z4dv-python3.6-jupyterhub-0.8.1/bin/jupyterhub-singleuser'...
wrapping `/nix/store/pr65n8611y7y5hknfcdkkdnni934z4dv-python3.6-jupyterhub-0.8.1/bin/jupyterhub'...
error: build of ‘/nix/store/b6b9xhljbc9sgk500lfhb7w0pysjk6lp-python2.7-jupyterhub-0.8.1.drv’ failed
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.
Failure for system: aarch64-linux
/build/jupyterhub-0.8.1
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/1aiid8gz93mh27zm46dh6g4xkdmlkn02-python3.6-jupyterhub-0.8.1
strip is /nix/store/jwz859pxqj7sl2dbwvmxkx68jp774izb-binutils-2.28.1/bin/strip
stripping (with command strip and flags -S) in /nix/store/1aiid8gz93mh27zm46dh6g4xkdmlkn02-python3.6-jupyterhub-0.8.1/lib /nix/store/1aiid8gz93mh27zm46dh6g4xkdmlkn02-python3.6-jupyterhub-0.8.1/bin
patching script interpreter paths in /nix/store/1aiid8gz93mh27zm46dh6g4xkdmlkn02-python3.6-jupyterhub-0.8.1
checking for references to /build in /nix/store/1aiid8gz93mh27zm46dh6g4xkdmlkn02-python3.6-jupyterhub-0.8.1...
wrapping `/nix/store/1aiid8gz93mh27zm46dh6g4xkdmlkn02-python3.6-jupyterhub-0.8.1/bin/jupyterhub'...
wrapping `/nix/store/1aiid8gz93mh27zm46dh6g4xkdmlkn02-python3.6-jupyterhub-0.8.1/bin/jupyterhub-singleuser'...
error: build of '/nix/store/l3yg9vrlsr4mzx3p8s377gd6dc4dr9rq-python2.7-jupyterhub-0.8.1.drv' failed
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.
ERROR: JupyterHub requires Python version 3.4 or above.
builder for '/nix/store/7nx99i1gw60h56fwddyw3317k71iaxfi-python2.7-jupyterhub-0.8.1.drv' failed with exit code 1
error: build of '/nix/store/7nx99i1gw60h56fwddyw3317k71iaxfi-python2.7-jupyterhub-0.8.1.drv' failed
jupyterhub
needs a
disabled = pythonOlder "3.4";
@GrahamcOfBorg build python3.pkgs.jupyterhub |
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.
Failure for system: x86_64-linux
error: while evaluating ‘callPackageWith’ at /var/lib/gc-of-borg/.nix-test-rs/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-zoidberg/lib/customisation.nix:113:35, called from /var/lib/gc-of-borg/.nix-test-rs/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-zoidberg/pkgs/top-level/python-packages.nix:9520:16:
while evaluating ‘makeOverridable’ at /var/lib/gc-of-borg/.nix-test-rs/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-zoidberg/lib/customisation.nix:72:24, called from /var/lib/gc-of-borg/.nix-test-rs/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-zoidberg/lib/customisation.nix:117:8:
undefined variable ‘pythonOlder’ at /var/lib/gc-of-borg/.nix-test-rs/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-zoidberg/pkgs/development/python-modules/jupyterhub/default.nix:113:14
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.
Failure for system: aarch64-linux
error: while evaluating 'callPackageWith' at /var/lib/gc-of-borg/nix-test-rs-3/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-aarch64-community-3/lib/customisation.nix:113:35, called from /var/lib/gc-of-borg/nix-test-rs-3/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-aarch64-community-3/pkgs/top-level/python-packages.nix:9520:16:
while evaluating 'makeOverridable' at /var/lib/gc-of-borg/nix-test-rs-3/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-aarch64-community-3/lib/customisation.nix:72:24, called from /var/lib/gc-of-borg/nix-test-rs-3/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-aarch64-community-3/lib/customisation.nix:117:8:
undefined variable 'pythonOlder' at /var/lib/gc-of-borg/nix-test-rs-3/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-aarch64-community-3/pkgs/development/python-modules/jupyterhub/default.nix:113:14
@GrahamcOfBorg build python3.pkgs.jupyterhub |
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.
Failure for system: x86_64-darwin
Package ‘linux-pam-1.3.0’ in /Users/graham/nix-borg/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-zoidberg/pkgs/os-specific/linux/pam/default.nix:53 is not supported on ‘x86_64-darwin’, refusing to evaluate.
a) For `nixos-rebuild` you can set
{ nixpkgs.config.allowBroken = true; }
in configuration.nix to override this.
b) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
{ allowBroken = true; }
to ~/.config/nixpkgs/config.nix.
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.
Success for system: aarch64-linux
/nix/store/1aiid8gz93mh27zm46dh6g4xkdmlkn02-python3.6-jupyterhub-0.8.1
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.
Success for system: x86_64-linux
/tmp/nix-build-python3.6-jupyterhub-0.8.1.drv-0/jupyterhub-0.8.1
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/pr65n8611y7y5hknfcdkkdnni934z4dv-python3.6-jupyterhub-0.8.1
strip is /nix/store/mdyy001q67hiks0g24ra53z7ckm4jfr4-binutils-2.28.1/bin/strip
stripping (with command strip and flags -S) in /nix/store/pr65n8611y7y5hknfcdkkdnni934z4dv-python3.6-jupyterhub-0.8.1/lib /nix/store/pr65n8611y7y5hknfcdkkdnni934z4dv-python3.6-jupyterhub-0.8.1/bin
patching script interpreter paths in /nix/store/pr65n8611y7y5hknfcdkkdnni934z4dv-python3.6-jupyterhub-0.8.1
checking for references to /tmp/nix-build-python3.6-jupyterhub-0.8.1.drv-0 in /nix/store/pr65n8611y7y5hknfcdkkdnni934z4dv-python3.6-jupyterhub-0.8.1...
wrapping `/nix/store/pr65n8611y7y5hknfcdkkdnni934z4dv-python3.6-jupyterhub-0.8.1/bin/jupyterhub'...
wrapping `/nix/store/pr65n8611y7y5hknfcdkkdnni934z4dv-python3.6-jupyterhub-0.8.1/bin/jupyterhub-singleuser'...
/nix/store/pr65n8611y7y5hknfcdkkdnni934z4dv-python3.6-jupyterhub-0.8.1
@ixxie Don't sweat it -- nice work! :) |
Motivation for this change
Initial packaging of Jupyterhub; also packaged the dependency python-oauth2.
Things done
build-use-sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)