{"action":"opened","number":38316,"pull_request":{"url":"https://api.github.com/repos/NixOS/nixpkgs/pulls/38316","id":178773946,"html_url":"https://github.com/NixOS/nixpkgs/pull/38316","diff_url":"https://github.com/NixOS/nixpkgs/pull/38316.diff","patch_url":"https://github.com/NixOS/nixpkgs/pull/38316.patch","issue_url":"https://api.github.com/repos/NixOS/nixpkgs/issues/38316","number":38316,"state":"open","locked":false,"title":"Vulkan etc","user":{"login":"Rotaerk","id":17690823,"avatar_url":"https://avatars0.githubusercontent.com/u/17690823?v=4","gravatar_id":"","url":"https://api.github.com/users/Rotaerk","html_url":"https://github.com/Rotaerk","followers_url":"https://api.github.com/users/Rotaerk/followers","following_url":"https://api.github.com/users/Rotaerk/following{/other_user}","gists_url":"https://api.github.com/users/Rotaerk/gists{/gist_id}","starred_url":"https://api.github.com/users/Rotaerk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Rotaerk/subscriptions","organizations_url":"https://api.github.com/users/Rotaerk/orgs","repos_url":"https://api.github.com/users/Rotaerk/repos","events_url":"https://api.github.com/users/Rotaerk/events{/privacy}","received_events_url":"https://api.github.com/users/Rotaerk/received_events","type":"User","site_admin":false},"body":"###### Motivation for this change\r\nWhen Vulkan looks for validation layers, it looks for JSON files in several directories.  One of those directories is <vulkan-loader>/etc/vulkan/explicit_layer.d.  This appears to be because <vulkan-loader>/etc is specified in SYSCONFDIR, which is used [here in the Vulkan loader source](https://github.com/KhronosGroup/Vulkan-LoaderAndValidationLayers/blob/72eb69da597fc245a607280e93212d658401eda2/loader/loader.c#L3172).  And according to [the Vulkan loader's BUILD.md file](https://github.com/KhronosGroup/Vulkan-LoaderAndValidationLayers/blob/c2388b0c6daf4044947bee0f91806d7e310a9d8e/BUILD.md#linux-install-to-system-directories):  \"You can further customize the installation directories by using the CMake variables CMAKE_INSTALL_SYSCONFDIR to rename the etc directory and CMAKE_INSTALL_DATADIR to rename the share directory\".  It seems pretty clear that the vulkan/explicit_layer.d folder _should_ be in etc, not share.\r\n\r\nAs for how the current version seems to work already:  A later folder that it checks for these JSON files (after it fails to find anything at <vulkan-loader>/etc/vulkan/explicit_layer.d) is <user-profile>/share/vulkan/explicit_layer.d.  (No idea why it checks share instead of etc _here_, though.)  When you install vulkan-loader via nix-env, it seems to also copy the files to that folder, which allows Vulkan to find them.  However, in a context where you're running a nix-shell or nix-build _without_ already having vulkan-loader installed via nix-env, it fails to find the files anywhere.\r\n\r\n###### Things done\r\nChanged the install phase to place vulkan/explicit_layer.d under <vulkan-loader>/etc instead of <vulkan-loader>/share.\r\n\r\nCaveat:  My only testing is that I ran vulkaninfo under nix-shell, with and without my change, and it worked only with my change.  I also my own tutorial-based Vulkan program, built with a dependency on vulkan-loader, and it failed to find any installed validation layers until my fix was applied.\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- [ ] 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).\r\n\r\n---\r\n\r\n","created_at":"2018-04-02T05:06:41Z","updated_at":"2018-04-02T05:06:41Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/NixOS/nixpkgs/pulls/38316/commits","review_comments_url":"https://api.github.com/repos/NixOS/nixpkgs/pulls/38316/comments","review_comment_url":"https://api.github.com/repos/NixOS/nixpkgs/pulls/comments{/number}","comments_url":"https://api.github.com/repos/NixOS/nixpkgs/issues/38316/comments","statuses_url":"https://api.github.com/repos/NixOS/nixpkgs/statuses/c94b084b46a835baa24a01f1c75ff8b6c4baf55f","head":{"label":"Rotaerk:vulkan-etc","ref":"vulkan-etc","sha":"c94b084b46a835baa24a01f1c75ff8b6c4baf55f","user":{"login":"Rotaerk","id":17690823,"avatar_url":"https://avatars0.githubusercontent.com/u/17690823?v=4","gravatar_id":"","url":"https://api.github.com/users/Rotaerk","html_url":"https://github.com/Rotaerk","followers_url":"https://api.github.com/users/Rotaerk/followers","following_url":"https://api.github.com/users/Rotaerk/following{/other_user}","gists_url":"https://api.github.com/users/Rotaerk/gists{/gist_id}","starred_url":"https://api.github.com/users/Rotaerk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Rotaerk/subscriptions","organizations_url":"https://api.github.com/users/Rotaerk/orgs","repos_url":"https://api.github.com/users/Rotaerk/repos","events_url":"https://api.github.com/users/Rotaerk/events{/privacy}","received_events_url":"https://api.github.com/users/Rotaerk/received_events","type":"User","site_admin":false},"repo":{"id":127700474,"name":"nixpkgs","full_name":"Rotaerk/nixpkgs","owner":{"login":"Rotaerk","id":17690823,"avatar_url":"https://avatars0.githubusercontent.com/u/17690823?v=4","gravatar_id":"","url":"https://api.github.com/users/Rotaerk","html_url":"https://github.com/Rotaerk","followers_url":"https://api.github.com/users/Rotaerk/followers","following_url":"https://api.github.com/users/Rotaerk/following{/other_user}","gists_url":"https://api.github.com/users/Rotaerk/gists{/gist_id}","starred_url":"https://api.github.com/users/Rotaerk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Rotaerk/subscriptions","organizations_url":"https://api.github.com/users/Rotaerk/orgs","repos_url":"https://api.github.com/users/Rotaerk/repos","events_url":"https://api.github.com/users/Rotaerk/events{/privacy}","received_events_url":"https://api.github.com/users/Rotaerk/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Rotaerk/nixpkgs","description":"Nix Packages collection","fork":true,"url":"https://api.github.com/repos/Rotaerk/nixpkgs","forks_url":"https://api.github.com/repos/Rotaerk/nixpkgs/forks","keys_url":"https://api.github.com/repos/Rotaerk/nixpkgs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Rotaerk/nixpkgs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Rotaerk/nixpkgs/teams","hooks_url":"https://api.github.com/repos/Rotaerk/nixpkgs/hooks","issue_events_url":"https://api.github.com/repos/Rotaerk/nixpkgs/issues/events{/number}","events_url":"https://api.github.com/repos/Rotaerk/nixpkgs/events","assignees_url":"https://api.github.com/repos/Rotaerk/nixpkgs/assignees{/user}","branches_url":"https://api.github.com/repos/Rotaerk/nixpkgs/branches{/branch}","tags_url":"https://api.github.com/repos/Rotaerk/nixpkgs/tags","blobs_url":"https://api.github.com/repos/Rotaerk/nixpkgs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Rotaerk/nixpkgs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Rotaerk/nixpkgs/git/refs{/sha}","trees_url":"https://api.github.com/repos/Rotaerk/nixpkgs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Rotaerk/nixpkgs/statuses/{sha}","languages_url":"https://api.github.com/repos/Rotaerk/nixpkgs/languages","stargazers_url":"https://api.github.com/repos/Rotaerk/nixpkgs/stargazers","contributors_url":"https://api.github.com/repos/Rotaerk/nixpkgs/contributors","subscribers_url":"https://api.github.com/repos/Rotaerk/nixpkgs/subscribers","subscription_url":"https://api.github.com/repos/Rotaerk/nixpkgs/subscription","commits_url":"https://api.github.com/repos/Rotaerk/nixpkgs/commits{/sha}","git_commits_url":"https://api.github.com/repos/Rotaerk/nixpkgs/git/commits{/sha}","comments_url":"https://api.github.com/repos/Rotaerk/nixpkgs/comments{/number}","issue_comment_url":"https://api.github.com/repos/Rotaerk/nixpkgs/issues/comments{/number}","contents_url":"https://api.github.com/repos/Rotaerk/nixpkgs/contents/{+path}","compare_url":"https://api.github.com/repos/Rotaerk/nixpkgs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Rotaerk/nixpkgs/merges","archive_url":"https://api.github.com/repos/Rotaerk/nixpkgs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Rotaerk/nixpkgs/downloads","issues_url":"https://api.github.com/repos/Rotaerk/nixpkgs/issues{/number}","pulls_url":"https://api.github.com/repos/Rotaerk/nixpkgs/pulls{/number}","milestones_url":"https://api.github.com/repos/Rotaerk/nixpkgs/milestones{/number}","notifications_url":"https://api.github.com/repos/Rotaerk/nixpkgs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Rotaerk/nixpkgs/labels{/name}","releases_url":"https://api.github.com/repos/Rotaerk/nixpkgs/releases{/id}","deployments_url":"https://api.github.com/repos/Rotaerk/nixpkgs/deployments","created_at":"2018-04-02T03:58:40Z","updated_at":"2018-04-02T03:59:11Z","pushed_at":"2018-04-02T04:38:21Z","git_url":"git://github.com/Rotaerk/nixpkgs.git","ssh_url":"git@github.com:Rotaerk/nixpkgs.git","clone_url":"https://github.com/Rotaerk/nixpkgs.git","svn_url":"https://github.com/Rotaerk/nixpkgs","homepage":null,"size":762070,"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":"Other","spdx_id":null,"url":null},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"NixOS:master","ref":"master","sha":"6654fde54888bc58e1f9321cb9a0215342cda512","user":{"login":"NixOS","id":487568,"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,"name":"nixpkgs","full_name":"NixOS/nixpkgs","owner":{"login":"NixOS","id":487568,"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},"private":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-04-02T03:54:59Z","pushed_at":"2018-04-02T04:23:41Z","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":762071,"stargazers_count":2337,"watchers_count":2337,"language":"Nix","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":2678,"mirror_url":null,"archived":false,"open_issues_count":3178,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":2678,"open_issues":3178,"watchers":2337,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/NixOS/nixpkgs/pulls/38316"},"html":{"href":"https://github.com/NixOS/nixpkgs/pull/38316"},"issue":{"href":"https://api.github.com/repos/NixOS/nixpkgs/issues/38316"},"comments":{"href":"https://api.github.com/repos/NixOS/nixpkgs/issues/38316/comments"},"review_comments":{"href":"https://api.github.com/repos/NixOS/nixpkgs/pulls/38316/comments"},"review_comment":{"href":"https://api.github.com/repos/NixOS/nixpkgs/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/NixOS/nixpkgs/pulls/38316/commits"},"statuses":{"href":"https://api.github.com/repos/NixOS/nixpkgs/statuses/c94b084b46a835baa24a01f1c75ff8b6c4baf55f"}},"author_association":"NONE","merged":false,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":true,"commits":2,"additions":3,"deletions":3,"changed_files":1}}
{"actor":{"display_login":"Rotaerk"}}