{"action":"created","issue":{"url":"https://api.github.com/repos/NixOS/nixpkgs/issues/43282","repository_url":"https://api.github.com/repos/NixOS/nixpkgs","labels_url":"https://api.github.com/repos/NixOS/nixpkgs/issues/43282/labels{/name}","comments_url":"https://api.github.com/repos/NixOS/nixpkgs/issues/43282/comments","events_url":"https://api.github.com/repos/NixOS/nixpkgs/issues/43282/events","html_url":"https://github.com/NixOS/nixpkgs/pull/43282","id":339860300,"node_id":"MDExOlB1bGxSZXF1ZXN0MjAwNDA5ODQ3","number":43282,"title":"nixos/ohMyZsh: allow multiple derivations in `ZSH_CUSTOM`","user":{"login":"Ma27","id":6025220,"node_id":"MDQ6VXNlcjYwMjUyMjA=","avatar_url":"https://avatars0.githubusercontent.com/u/6025220?v=4","gravatar_id":"","url":"https://api.github.com/users/Ma27","html_url":"https://github.com/Ma27","followers_url":"https://api.github.com/users/Ma27/followers","following_url":"https://api.github.com/users/Ma27/following{/other_user}","gists_url":"https://api.github.com/users/Ma27/gists{/gist_id}","starred_url":"https://api.github.com/users/Ma27/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ma27/subscriptions","organizations_url":"https://api.github.com/users/Ma27/orgs","repos_url":"https://api.github.com/users/Ma27/repos","events_url":"https://api.github.com/users/Ma27/events{/privacy}","received_events_url":"https://api.github.com/users/Ma27/received_events","type":"User","site_admin":false},"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},{"id":60265212,"node_id":"MDU6TGFiZWw2MDI2NTIxMg==","url":"https://api.github.com/repos/NixOS/nixpkgs/labels/6.topic:%20nixos","name":"6.topic: nixos","color":"fef2c0","default":false},{"id":290122884,"node_id":"MDU6TGFiZWwyOTAxMjI4ODQ=","url":"https://api.github.com/repos/NixOS/nixpkgs/labels/8.has:%20module%20(update)","name":"8.has: module (update)","color":"009800","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2018-07-10T14:10:21Z","updated_at":"2018-08-05T09:41:00Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/NixOS/nixpkgs/pulls/43282","html_url":"https://github.com/NixOS/nixpkgs/pull/43282","diff_url":"https://github.com/NixOS/nixpkgs/pull/43282.diff","patch_url":"https://github.com/NixOS/nixpkgs/pull/43282.patch"},"body":"###### Motivation for this change\r\n\r\nFor third-party scripts `oh-my-zsh` provides `ZSH_THEME`. However this can be set to only one directory. However the module should be able to support multiple third-party scripts packaged as derivations using nix's composability features (namely `buildEnv`).\r\n\r\nNow a config like this is possible:\r\n\r\n``` nix\r\n{ pkgs, ... }:\r\n{\r\n  programs.zsh.enable = true;\r\n  programs.zsh.ohMyZsh = {\r\n    enable = true;\r\n    customPkgs = [\r\n      pkgs.lambda-mod-zsh-theme\r\n      pkgs.nix-zsh-completions\r\n    ];\r\n    theme = \"lambda-mod\";\r\n    plugins = [ \"nix\" ];\r\n  };\r\n}\r\n```\r\n\r\nThe support for `ohMyZsh.custom` has been retained as it's possible that `ZSH_CUSTOM` should point to a personal directory (e.g. a scripts dir in `$HOME`). An assertion ensures that no collisions between these features happens.\r\n\r\nThe commits are structured like this:\r\n\r\n* modify `nix-zsh-completions` package (add hooks, cleanup meta, add plugin script, allow (optionally) an oh-my-zsh like structure (with `themes/`,`plugins/` etc rather than `share/zsh`)\r\n* improve `lambda-mod-zsh-theme` (only usable with `oh-my-zsh`, drops usage of `$out/share`, instead `$out/themes` is used)\r\n* relevant updates to the modules\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- [x] 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- [x] 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).\r\n\r\n---\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/NixOS/nixpkgs/issues/comments/410508025","html_url":"https://github.com/NixOS/nixpkgs/pull/43282#issuecomment-410508025","issue_url":"https://api.github.com/repos/NixOS/nixpkgs/issues/43282","id":410508025,"node_id":"MDEyOklzc3VlQ29tbWVudDQxMDUwODAyNQ==","user":{"login":"Ma27","id":6025220,"node_id":"MDQ6VXNlcjYwMjUyMjA=","avatar_url":"https://avatars0.githubusercontent.com/u/6025220?v=4","gravatar_id":"","url":"https://api.github.com/users/Ma27","html_url":"https://github.com/Ma27","followers_url":"https://api.github.com/users/Ma27/followers","following_url":"https://api.github.com/users/Ma27/following{/other_user}","gists_url":"https://api.github.com/users/Ma27/gists{/gist_id}","starred_url":"https://api.github.com/users/Ma27/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ma27/subscriptions","organizations_url":"https://api.github.com/users/Ma27/orgs","repos_url":"https://api.github.com/users/Ma27/repos","events_url":"https://api.github.com/users/Ma27/events{/privacy}","received_events_url":"https://api.github.com/users/Ma27/received_events","type":"User","site_admin":false},"created_at":"2018-08-05T09:41:00Z","updated_at":"2018-08-05T09:41:00Z","author_association":"CONTRIBUTOR","body":"@Infinisil fixed, thanks a lot for your feedback!"}}
{"actor":{"display_login":"Ma27"}}