{"action":"created","comment":{"url":"https://api.github.com/repos/NixOS/nixpkgs/pulls/comments/222879667","pull_request_review_id":161874694,"id":222879667,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyMjg3OTY2Nw==","diff_hunk":"@@ -0,0 +1,51 @@\n+From: Shreyansh Khajanchi <shreyansh_k@live.com>\n+Date: Wed, 5 Sep 2018 20:06:25 +0530\n+Subject: helpers/content.go: call rst2html directly to render content\n+\n+Hugo launches rst2html by calling Python interpreter and passing it the path of rst2html file.\n+This doesn't work on NixOS because the real rst2html is actually wrapped behind a bash script which is responsible for correctly setting the env and then exec-ing the real rst2html.\n+\n+The problem is that rst2html is actually a bash script and not a Python script. Hence, Python fails to launch it with SyntaxError.\n+\n+This patch ensures that rst2html is called directly so the shebang work correctly.\n+---\n+ helpers/content.go | 16 ++--------------\n+ 1 file changed, 2 insertions(+), 14 deletions(-)\n+\n+diff --git a/helpers/content.go b/helpers/content.go\n+index 55d8ce202..18c648a43 100644\n+--- a/helpers/content.go\n++++ b/helpers/content.go\n+@@ -664,21 +664,9 @@ func getRstExecPath() string {\n+ \treturn path\n+ }\n+ \n+-func getPythonExecPath() string {\n+-\tpath, err := exec.LookPath(\"python\")","path":"pkgs/applications/misc/hugo/010-call-rst2html-directly.patch","position":28,"original_position":24,"commit_id":"9c24eee57dafca13ae6a683aad82e8860fbf7005","original_commit_id":"866f84a84319bbfde61a78feb101da0cb8e98856","user":{"login":"shreyanshk","id":8820721,"node_id":"MDQ6VXNlcjg4MjA3MjE=","avatar_url":"https://avatars1.githubusercontent.com/u/8820721?v=4","gravatar_id":"","url":"https://api.github.com/users/shreyanshk","html_url":"https://github.com/shreyanshk","followers_url":"https://api.github.com/users/shreyanshk/followers","following_url":"https://api.github.com/users/shreyanshk/following{/other_user}","gists_url":"https://api.github.com/users/shreyanshk/gists{/gist_id}","starred_url":"https://api.github.com/users/shreyanshk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shreyanshk/subscriptions","organizations_url":"https://api.github.com/users/shreyanshk/orgs","repos_url":"https://api.github.com/users/shreyanshk/repos","events_url":"https://api.github.com/users/shreyanshk/events{/privacy}","received_events_url":"https://api.github.com/users/shreyanshk/received_events","type":"User","site_admin":false},"body":"Oh! let's wait for upstream to merge it.","created_at":"2018-10-05T02:42:42Z","updated_at":"2018-10-05T02:42:42Z","html_url":"https://github.com/NixOS/nixpkgs/pull/47600#discussion_r222879667","pull_request_url":"https://api.github.com/repos/NixOS/nixpkgs/pulls/47600","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/NixOS/nixpkgs/pulls/comments/222879667"},"html":{"href":"https://github.com/NixOS/nixpkgs/pull/47600#discussion_r222879667"},"pull_request":{"href":"https://api.github.com/repos/NixOS/nixpkgs/pulls/47600"}},"in_reply_to_id":221695888},"pull_request":{"url":"https://api.github.com/repos/NixOS/nixpkgs/pulls/47600","id":219402497,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE5NDAyNDk3","html_url":"https://github.com/NixOS/nixpkgs/pull/47600","diff_url":"https://github.com/NixOS/nixpkgs/pull/47600.diff","patch_url":"https://github.com/NixOS/nixpkgs/pull/47600.patch","issue_url":"https://api.github.com/repos/NixOS/nixpkgs/issues/47600","number":47600,"state":"open","locked":false,"title":"hugo: helpers/content.go: call rst2html directly to render content","user":{"login":"shreyanshk","id":8820721,"node_id":"MDQ6VXNlcjg4MjA3MjE=","avatar_url":"https://avatars1.githubusercontent.com/u/8820721?v=4","gravatar_id":"","url":"https://api.github.com/users/shreyanshk","html_url":"https://github.com/shreyanshk","followers_url":"https://api.github.com/users/shreyanshk/followers","following_url":"https://api.github.com/users/shreyanshk/following{/other_user}","gists_url":"https://api.github.com/users/shreyanshk/gists{/gist_id}","starred_url":"https://api.github.com/users/shreyanshk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shreyanshk/subscriptions","organizations_url":"https://api.github.com/users/shreyanshk/orgs","repos_url":"https://api.github.com/users/shreyanshk/repos","events_url":"https://api.github.com/users/shreyanshk/events{/privacy}","received_events_url":"https://api.github.com/users/shreyanshk/received_events","type":"User","site_admin":false},"body":"###### Motivation for this change\r\n\r\nHugo launches rst2html by calling Python interpreter and passing it the path of rst2html file.\r\nThis doesn't work on NixOS because the real rst2html is actually wrapped behind a bash script which is responsible for correctly setting the env and then exec-ing the real rst2html.\r\n\r\nThe problem is that rst2html is actually a bash script and not a Python script. Hence, Python fails to launch it with SyntaxError.\r\n\r\nThis patch ensures that rst2html is called directly so the shebang work correctly.\r\n\r\n###### Things done\r\n\r\n- [ ] Tested using sandboxing ([nix.useSandbox](http://nixos.org/nixos/manual/options.html#opt-nix.useSandbox) on NixOS, or option `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- [ ] Determined the impact on package closure size (by running `nix path-info -S` before and after)\r\n- [x] Fits [CONTRIBUTING.md](https://github.com/NixOS/nixpkgs/blob/master/.github/CONTRIBUTING.md).","created_at":"2018-10-01T14:44:47Z","updated_at":"2018-10-05T02:42:42Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6c801d8f5ca8888c10421f3cdfaca487a8972ef4","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":731735222,"node_id":"MDU6TGFiZWw3MzE3MzUyMjI=","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":731733923,"node_id":"MDU6TGFiZWw3MzE3MzM5MjM=","url":"https://api.github.com/repos/NixOS/nixpkgs/labels/10.rebuild-linux:%201-10","name":"10.rebuild-linux: 1-10","color":"eeffee","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/NixOS/nixpkgs/pulls/47600/commits","review_comments_url":"https://api.github.com/repos/NixOS/nixpkgs/pulls/47600/comments","review_comment_url":"https://api.github.com/repos/NixOS/nixpkgs/pulls/comments{/number}","comments_url":"https://api.github.com/repos/NixOS/nixpkgs/issues/47600/comments","statuses_url":"https://api.github.com/repos/NixOS/nixpkgs/statuses/9c24eee57dafca13ae6a683aad82e8860fbf7005","head":{"label":"shreyanshk:master","ref":"master","sha":"9c24eee57dafca13ae6a683aad82e8860fbf7005","user":{"login":"shreyanshk","id":8820721,"node_id":"MDQ6VXNlcjg4MjA3MjE=","avatar_url":"https://avatars1.githubusercontent.com/u/8820721?v=4","gravatar_id":"","url":"https://api.github.com/users/shreyanshk","html_url":"https://github.com/shreyanshk","followers_url":"https://api.github.com/users/shreyanshk/followers","following_url":"https://api.github.com/users/shreyanshk/following{/other_user}","gists_url":"https://api.github.com/users/shreyanshk/gists{/gist_id}","starred_url":"https://api.github.com/users/shreyanshk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shreyanshk/subscriptions","organizations_url":"https://api.github.com/users/shreyanshk/orgs","repos_url":"https://api.github.com/users/shreyanshk/repos","events_url":"https://api.github.com/users/shreyanshk/events{/privacy}","received_events_url":"https://api.github.com/users/shreyanshk/received_events","type":"User","site_admin":false},"repo":{"id":151094691,"node_id":"MDEwOlJlcG9zaXRvcnkxNTEwOTQ2OTE=","name":"nixpkgs","full_name":"shreyanshk/nixpkgs","private":false,"owner":{"login":"shreyanshk","id":8820721,"node_id":"MDQ6VXNlcjg4MjA3MjE=","avatar_url":"https://avatars1.githubusercontent.com/u/8820721?v=4","gravatar_id":"","url":"https://api.github.com/users/shreyanshk","html_url":"https://github.com/shreyanshk","followers_url":"https://api.github.com/users/shreyanshk/followers","following_url":"https://api.github.com/users/shreyanshk/following{/other_user}","gists_url":"https://api.github.com/users/shreyanshk/gists{/gist_id}","starred_url":"https://api.github.com/users/shreyanshk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shreyanshk/subscriptions","organizations_url":"https://api.github.com/users/shreyanshk/orgs","repos_url":"https://api.github.com/users/shreyanshk/repos","events_url":"https://api.github.com/users/shreyanshk/events{/privacy}","received_events_url":"https://api.github.com/users/shreyanshk/received_events","type":"User","site_admin":false},"html_url":"https://github.com/shreyanshk/nixpkgs","description":"Nix Packages collection","fork":true,"url":"https://api.github.com/repos/shreyanshk/nixpkgs","forks_url":"https://api.github.com/repos/shreyanshk/nixpkgs/forks","keys_url":"https://api.github.com/repos/shreyanshk/nixpkgs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/shreyanshk/nixpkgs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/shreyanshk/nixpkgs/teams","hooks_url":"https://api.github.com/repos/shreyanshk/nixpkgs/hooks","issue_events_url":"https://api.github.com/repos/shreyanshk/nixpkgs/issues/events{/number}","events_url":"https://api.github.com/repos/shreyanshk/nixpkgs/events","assignees_url":"https://api.github.com/repos/shreyanshk/nixpkgs/assignees{/user}","branches_url":"https://api.github.com/repos/shreyanshk/nixpkgs/branches{/branch}","tags_url":"https://api.github.com/repos/shreyanshk/nixpkgs/tags","blobs_url":"https://api.github.com/repos/shreyanshk/nixpkgs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/shreyanshk/nixpkgs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/shreyanshk/nixpkgs/git/refs{/sha}","trees_url":"https://api.github.com/repos/shreyanshk/nixpkgs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/shreyanshk/nixpkgs/statuses/{sha}","languages_url":"https://api.github.com/repos/shreyanshk/nixpkgs/languages","stargazers_url":"https://api.github.com/repos/shreyanshk/nixpkgs/stargazers","contributors_url":"https://api.github.com/repos/shreyanshk/nixpkgs/contributors","subscribers_url":"https://api.github.com/repos/shreyanshk/nixpkgs/subscribers","subscription_url":"https://api.github.com/repos/shreyanshk/nixpkgs/subscription","commits_url":"https://api.github.com/repos/shreyanshk/nixpkgs/commits{/sha}","git_commits_url":"https://api.github.com/repos/shreyanshk/nixpkgs/git/commits{/sha}","comments_url":"https://api.github.com/repos/shreyanshk/nixpkgs/comments{/number}","issue_comment_url":"https://api.github.com/repos/shreyanshk/nixpkgs/issues/comments{/number}","contents_url":"https://api.github.com/repos/shreyanshk/nixpkgs/contents/{+path}","compare_url":"https://api.github.com/repos/shreyanshk/nixpkgs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/shreyanshk/nixpkgs/merges","archive_url":"https://api.github.com/repos/shreyanshk/nixpkgs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/shreyanshk/nixpkgs/downloads","issues_url":"https://api.github.com/repos/shreyanshk/nixpkgs/issues{/number}","pulls_url":"https://api.github.com/repos/shreyanshk/nixpkgs/pulls{/number}","milestones_url":"https://api.github.com/repos/shreyanshk/nixpkgs/milestones{/number}","notifications_url":"https://api.github.com/repos/shreyanshk/nixpkgs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/shreyanshk/nixpkgs/labels{/name}","releases_url":"https://api.github.com/repos/shreyanshk/nixpkgs/releases{/id}","deployments_url":"https://api.github.com/repos/shreyanshk/nixpkgs/deployments","created_at":"2018-10-01T13:38:27Z","updated_at":"2018-10-03T14:39:18Z","pushed_at":"2018-10-03T14:39:14Z","git_url":"git://github.com/shreyanshk/nixpkgs.git","ssh_url":"git@github.com:shreyanshk/nixpkgs.git","clone_url":"https://github.com/shreyanshk/nixpkgs.git","svn_url":"https://github.com/shreyanshk/nixpkgs","homepage":null,"size":853122,"stargazers_count":0,"watchers_count":0,"language":"Nix","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"other","name":"NOASSERTION","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"NixOS:master","ref":"master","sha":"ae2bb82a8d3e6b33d37cf1eb41bbcfdf6e0fec71","user":{"login":"NixOS","id":487568,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ4NzU2OA==","avatar_url":"https://avatars3.githubusercontent.com/u/487568?v=4","gravatar_id":"","url":"https://api.github.com/users/NixOS","html_url":"https://github.com/NixOS","followers_url":"https://api.github.com/users/NixOS/followers","following_url":"https://api.github.com/users/NixOS/following{/other_user}","gists_url":"https://api.github.com/users/NixOS/gists{/gist_id}","starred_url":"https://api.github.com/users/NixOS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NixOS/subscriptions","organizations_url":"https://api.github.com/users/NixOS/orgs","repos_url":"https://api.github.com/users/NixOS/repos","events_url":"https://api.github.com/users/NixOS/events{/privacy}","received_events_url":"https://api.github.com/users/NixOS/received_events","type":"Organization","site_admin":false},"repo":{"id":4542716,"node_id":"MDEwOlJlcG9zaXRvcnk0NTQyNzE2","name":"nixpkgs","full_name":"NixOS/nixpkgs","private":false,"owner":{"login":"NixOS","id":487568,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ4NzU2OA==","avatar_url":"https://avatars3.githubusercontent.com/u/487568?v=4","gravatar_id":"","url":"https://api.github.com/users/NixOS","html_url":"https://github.com/NixOS","followers_url":"https://api.github.com/users/NixOS/followers","following_url":"https://api.github.com/users/NixOS/following{/other_user}","gists_url":"https://api.github.com/users/NixOS/gists{/gist_id}","starred_url":"https://api.github.com/users/NixOS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NixOS/subscriptions","organizations_url":"https://api.github.com/users/NixOS/orgs","repos_url":"https://api.github.com/users/NixOS/repos","events_url":"https://api.github.com/users/NixOS/events{/privacy}","received_events_url":"https://api.github.com/users/NixOS/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/NixOS/nixpkgs","description":"Nix Packages collection","fork":false,"url":"https://api.github.com/repos/NixOS/nixpkgs","forks_url":"https://api.github.com/repos/NixOS/nixpkgs/forks","keys_url":"https://api.github.com/repos/NixOS/nixpkgs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/NixOS/nixpkgs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/NixOS/nixpkgs/teams","hooks_url":"https://api.github.com/repos/NixOS/nixpkgs/hooks","issue_events_url":"https://api.github.com/repos/NixOS/nixpkgs/issues/events{/number}","events_url":"https://api.github.com/repos/NixOS/nixpkgs/events","assignees_url":"https://api.github.com/repos/NixOS/nixpkgs/assignees{/user}","branches_url":"https://api.github.com/repos/NixOS/nixpkgs/branches{/branch}","tags_url":"https://api.github.com/repos/NixOS/nixpkgs/tags","blobs_url":"https://api.github.com/repos/NixOS/nixpkgs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/NixOS/nixpkgs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/NixOS/nixpkgs/git/refs{/sha}","trees_url":"https://api.github.com/repos/NixOS/nixpkgs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/NixOS/nixpkgs/statuses/{sha}","languages_url":"https://api.github.com/repos/NixOS/nixpkgs/languages","stargazers_url":"https://api.github.com/repos/NixOS/nixpkgs/stargazers","contributors_url":"https://api.github.com/repos/NixOS/nixpkgs/contributors","subscribers_url":"https://api.github.com/repos/NixOS/nixpkgs/subscribers","subscription_url":"https://api.github.com/repos/NixOS/nixpkgs/subscription","commits_url":"https://api.github.com/repos/NixOS/nixpkgs/commits{/sha}","git_commits_url":"https://api.github.com/repos/NixOS/nixpkgs/git/commits{/sha}","comments_url":"https://api.github.com/repos/NixOS/nixpkgs/comments{/number}","issue_comment_url":"https://api.github.com/repos/NixOS/nixpkgs/issues/comments{/number}","contents_url":"https://api.github.com/repos/NixOS/nixpkgs/contents/{+path}","compare_url":"https://api.github.com/repos/NixOS/nixpkgs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/NixOS/nixpkgs/merges","archive_url":"https://api.github.com/repos/NixOS/nixpkgs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/NixOS/nixpkgs/downloads","issues_url":"https://api.github.com/repos/NixOS/nixpkgs/issues{/number}","pulls_url":"https://api.github.com/repos/NixOS/nixpkgs/pulls{/number}","milestones_url":"https://api.github.com/repos/NixOS/nixpkgs/milestones{/number}","notifications_url":"https://api.github.com/repos/NixOS/nixpkgs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/NixOS/nixpkgs/labels{/name}","releases_url":"https://api.github.com/repos/NixOS/nixpkgs/releases{/id}","deployments_url":"https://api.github.com/repos/NixOS/nixpkgs/deployments","created_at":"2012-06-04T02:49:46Z","updated_at":"2018-10-05T02:32:07Z","pushed_at":"2018-10-05T02:09:02Z","git_url":"git://github.com/NixOS/nixpkgs.git","ssh_url":"git@github.com:NixOS/nixpkgs.git","clone_url":"https://github.com/NixOS/nixpkgs.git","svn_url":"https://github.com/NixOS/nixpkgs","homepage":null,"size":864636,"stargazers_count":2860,"watchers_count":2860,"language":"Nix","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":3051,"mirror_url":null,"archived":false,"open_issues_count":3384,"license":{"key":"other","name":"NOASSERTION","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":3051,"open_issues":3384,"watchers":2860,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/NixOS/nixpkgs/pulls/47600"},"html":{"href":"https://github.com/NixOS/nixpkgs/pull/47600"},"issue":{"href":"https://api.github.com/repos/NixOS/nixpkgs/issues/47600"},"comments":{"href":"https://api.github.com/repos/NixOS/nixpkgs/issues/47600/comments"},"review_comments":{"href":"https://api.github.com/repos/NixOS/nixpkgs/pulls/47600/comments"},"review_comment":{"href":"https://api.github.com/repos/NixOS/nixpkgs/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/NixOS/nixpkgs/pulls/47600/commits"},"statuses":{"href":"https://api.github.com/repos/NixOS/nixpkgs/statuses/9c24eee57dafca13ae6a683aad82e8860fbf7005"}},"author_association":"NONE"}}
{"actor":{"display_login":"shreyanshk"}}