{"action":"created","issue":{"url":"https://api.github.com/repos/NixOS/nixpkgs/issues/35290","repository_url":"https://api.github.com/repos/NixOS/nixpkgs","labels_url":"https://api.github.com/repos/NixOS/nixpkgs/issues/35290/labels{/name}","comments_url":"https://api.github.com/repos/NixOS/nixpkgs/issues/35290/comments","events_url":"https://api.github.com/repos/NixOS/nixpkgs/issues/35290/events","html_url":"https://github.com/NixOS/nixpkgs/pull/35290","id":299104430,"number":35290,"title":"jupyter: add ijavascript kernel","user":{"login":"schneefux","id":15379000,"avatar_url":"https://avatars0.githubusercontent.com/u/15379000?v=4","gravatar_id":"","url":"https://api.github.com/users/schneefux","html_url":"https://github.com/schneefux","followers_url":"https://api.github.com/users/schneefux/followers","following_url":"https://api.github.com/users/schneefux/following{/other_user}","gists_url":"https://api.github.com/users/schneefux/gists{/gist_id}","starred_url":"https://api.github.com/users/schneefux/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/schneefux/subscriptions","organizations_url":"https://api.github.com/users/schneefux/orgs","repos_url":"https://api.github.com/users/schneefux/repos","events_url":"https://api.github.com/users/schneefux/events{/privacy}","received_events_url":"https://api.github.com/users/schneefux/received_events","type":"User","site_admin":false},"labels":[{"id":731735222,"url":"https://api.github.com/repos/NixOS/nixpkgs/labels/10.rebuild-darwin:%201-10","name":"10.rebuild-darwin: 1-10","color":"eeffee","default":false},{"id":731734101,"url":"https://api.github.com/repos/NixOS/nixpkgs/labels/10.rebuild-linux:%2011-100","name":"10.rebuild-linux: 11-100","color":"fbca04","default":false},{"id":60265212,"url":"https://api.github.com/repos/NixOS/nixpkgs/labels/6.topic:%20nixos","name":"6.topic: nixos","color":"fef2c0","default":false},{"id":9820195,"url":"https://api.github.com/repos/NixOS/nixpkgs/labels/6.topic:%20python","name":"6.topic: python","color":"fef2c0","default":false},{"id":290122884,"url":"https://api.github.com/repos/NixOS/nixpkgs/labels/8.has:%20module%20(update)","name":"8.has: module (update)","color":"009800","default":false},{"id":290122734,"url":"https://api.github.com/repos/NixOS/nixpkgs/labels/8.has:%20package%20(new)","name":"8.has: package (new)","color":"009800","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-02-21T19:49:35Z","updated_at":"2018-02-22T18:47:26Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/NixOS/nixpkgs/pulls/35290","html_url":"https://github.com/NixOS/nixpkgs/pull/35290","diff_url":"https://github.com/NixOS/nixpkgs/pull/35290.diff","patch_url":"https://github.com/NixOS/nixpkgs/pull/35290.patch"},"body":"###### Motivation for this change\r\nAdded the [IJavascript](http://n-riesco.github.io/ijavascript/index.html) Jupyter Notebook kernel to the (so far unmerged) pull request #33673 by @aborsu\r\n\r\nI added a `javascript` kernel to `pkgs/development/misc/jupyterKernels/default.nix` which requires the package `nodePackages.ijavascript`.\r\n\r\nFollowing the steps of the npm packaging documentation, I added the `ijavascript` package to `pkgs/development/node-packages/node-packages-v6.json` and added build input overrides in `pkgs/development/node-packages/default-v6.nix` because the package depends on node-gyp and zeromq.\r\nThen I ran the `generate.sh` script. Unfortunately it generated a huge diff of the `node-packages-v?.nix` files.\r\n\r\nI tested the updated module with this configuration:\r\n```nix\r\n  services.jupyter = {\r\n    enable = true;\r\n    port = 8465;\r\n    notebookDir = \"/var/www/jupyter\";\r\n    password = \"'sha1:1b961dc713fb:88483270a63e57d18d43cf337e629539de1436ba'\"; # test\r\n  };\r\n\r\n  services.nginx = {\r\n    enable = true;\r\n    virtualHosts = {\r\n        \"jupyter.mydomain.org\" = {\r\n                locations = {\r\n                        \"/\" = {\r\n                                proxyPass = \"http://localhost:8465\";\r\n                                proxyWebsockets = true;\r\n                        };\r\n                };\r\n        };\r\n   };\r\n};\r\n```\r\n\r\nBoth python3 and javascript notebooks run fine.\r\n\r\nNote that `proxyWebsockets = true` is required else the browser will fail to connect to the notebook. I discovered it by enabling debug logging in the nixos jupyter service.\r\nNPM dependencies for the notebook need to be installed into the `notebookDir`.\r\n\r\n###### Things done\r\n\r\n<!-- Please check what applies. Note that these are not hard requirements but merely serve as information for reviewers. -->\r\n\r\n- [ ] Tested using sandboxing ([nix.useSandbox](http://nixos.org/nixos/manual/options.html#opt-nix.useSandbox) on NixOS, or option `build-use-sandbox` in [`nix.conf`](http://nixos.org/nix/manual/#sec-conf-file) on non-NixOS)\r\n- Built on platform(s)\r\n   - [x] NixOS\r\n   - [ ] macOS\r\n   - [ ] other Linux distributions\r\n- [ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside [nixos/tests](https://github.com/NixOS/nixpkgs/blob/master/nixos/tests))\r\n- [ ] Tested compilation of all pkgs that depend on this change using `nix-shell -p nox --run \"nox-review wip\"`\r\n- [x] Tested execution of all binary files (usually in `./result/bin/`)\r\n- [ ] Fits [CONTRIBUTING.md](https://github.com/NixOS/nixpkgs/blob/master/.github/CONTRIBUTING.md)."},"comment":{"url":"https://api.github.com/repos/NixOS/nixpkgs/issues/comments/367780839","html_url":"https://github.com/NixOS/nixpkgs/pull/35290#issuecomment-367780839","issue_url":"https://api.github.com/repos/NixOS/nixpkgs/issues/35290","id":367780839,"user":{"login":"schneefux","id":15379000,"avatar_url":"https://avatars0.githubusercontent.com/u/15379000?v=4","gravatar_id":"","url":"https://api.github.com/users/schneefux","html_url":"https://github.com/schneefux","followers_url":"https://api.github.com/users/schneefux/followers","following_url":"https://api.github.com/users/schneefux/following{/other_user}","gists_url":"https://api.github.com/users/schneefux/gists{/gist_id}","starred_url":"https://api.github.com/users/schneefux/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/schneefux/subscriptions","organizations_url":"https://api.github.com/users/schneefux/orgs","repos_url":"https://api.github.com/users/schneefux/repos","events_url":"https://api.github.com/users/schneefux/events{/privacy}","received_events_url":"https://api.github.com/users/schneefux/received_events","type":"User","site_admin":false},"created_at":"2018-02-22T18:47:26Z","updated_at":"2018-02-22T18:47:26Z","author_association":"CONTRIBUTOR","body":"I upgraded it to a Node 8 package because a user probably wants the latest feature in the REPL.\r\n\r\n> Just got me thinking, if we start adding a lot of different kernels, we might want to make them disabled by default and add an override flag to make them enabled?\r\n\r\nAgreed, but I lack the Nix knowledge to know how."}}
{"actor":{"display_login":"schneefux"}}