Skip to content
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

nixos/ohMyZsh: allow multiple derivations in ZSH_CUSTOM #43282

Merged
merged 4 commits into from Aug 12, 2018

Conversation

Ma27
Copy link
Member

@Ma27 Ma27 commented Jul 10, 2018

Motivation for this change

For 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).

Now a config like this is possible:

{ pkgs, ... }:
{
  programs.zsh.enable = true;
  programs.zsh.ohMyZsh = {
    enable = true;
    customPkgs = [
      pkgs.lambda-mod-zsh-theme
      pkgs.nix-zsh-completions
    ];
    theme = "lambda-mod";
    plugins = [ "nix" ];
  };
}

The 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.

The commits are structured like this:

  • 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)
  • improve lambda-mod-zsh-theme (only usable with oh-my-zsh, drops usage of $out/share, instead $out/themes is used)
  • relevant updates to the modules
Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Fits CONTRIBUTING.md.

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: lambda-mod-zsh-theme, nix-zsh-completions

Partial log (click to expand)

installing
patching script interpreter paths in .
./lambda-mod.zsh-theme: interpreter directive changed from "/usr/bin/env zsh" to "/nix/store/7i5ym1srqq454abdc0k1ahs4vpn4j708-zsh-5.5.1/bin/zsh"
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/px9fz6lsqs5v9q3kmrmr1ckgmawxkdsm-lambda-mod-zsh-theme-unstable-2017-10-08
strip is /nix/store/4qvrxzxa535y8304mk195x50b6p9607d-binutils-2.30/bin/strip
patching script interpreter paths in /nix/store/px9fz6lsqs5v9q3kmrmr1ckgmawxkdsm-lambda-mod-zsh-theme-unstable-2017-10-08
checking for references to /build in /nix/store/px9fz6lsqs5v9q3kmrmr1ckgmawxkdsm-lambda-mod-zsh-theme-unstable-2017-10-08...
/nix/store/px9fz6lsqs5v9q3kmrmr1ckgmawxkdsm-lambda-mod-zsh-theme-unstable-2017-10-08
/nix/store/blrbh6scgmchsafg6gv8mmaabnj8k56f-nix-zsh-completions-0.4.0

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: lambda-mod-zsh-theme, nix-zsh-completions

Partial log (click to expand)

installing
patching script interpreter paths in .
./lambda-mod.zsh-theme: interpreter directive changed from "/usr/bin/env zsh" to "/nix/store/l322yvzki4qlkjlfqfinlxsqj0j6rpy5-zsh-5.5.1/bin/zsh"
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/9x2gwqwr47qv0bazh6dmwg1vxbj8ivl9-lambda-mod-zsh-theme-unstable-2017-10-08
strip is /nix/store/0pjsgkxz0rp5baycq5sp2s72lrr5q9sg-binutils-2.30/bin/strip
patching script interpreter paths in /nix/store/9x2gwqwr47qv0bazh6dmwg1vxbj8ivl9-lambda-mod-zsh-theme-unstable-2017-10-08
checking for references to /build in /nix/store/9x2gwqwr47qv0bazh6dmwg1vxbj8ivl9-lambda-mod-zsh-theme-unstable-2017-10-08...
/nix/store/9x2gwqwr47qv0bazh6dmwg1vxbj8ivl9-lambda-mod-zsh-theme-unstable-2017-10-08
/nix/store/kb9dzgvh70k3jfmvrnqmwzs5xkyzvmsf-nix-zsh-completions-0.4.0

@Ma27 Ma27 force-pushed the support-external-zsh-plugins branch from 1d8d157 to c643292 Compare July 13, 2018 21:03
@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: lambda-mod-zsh-theme, nix-zsh-completions

Partial log (click to expand)

installing
patching script interpreter paths in .
./lambda-mod.zsh-theme: interpreter directive changed from "/usr/bin/env zsh" to "/nix/store/7i5ym1srqq454abdc0k1ahs4vpn4j708-zsh-5.5.1/bin/zsh"
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/dq10a0cmxwbinvml98ff38ryahcpyccs-lambda-mod-zsh-theme-unstable-2017-10-08
strip is /nix/store/4qvrxzxa535y8304mk195x50b6p9607d-binutils-2.30/bin/strip
patching script interpreter paths in /nix/store/dq10a0cmxwbinvml98ff38ryahcpyccs-lambda-mod-zsh-theme-unstable-2017-10-08
checking for references to /build in /nix/store/dq10a0cmxwbinvml98ff38ryahcpyccs-lambda-mod-zsh-theme-unstable-2017-10-08...
/nix/store/dq10a0cmxwbinvml98ff38ryahcpyccs-lambda-mod-zsh-theme-unstable-2017-10-08
/nix/store/blrbh6scgmchsafg6gv8mmaabnj8k56f-nix-zsh-completions-0.4.0

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: lambda-mod-zsh-theme, nix-zsh-completions

Partial log (click to expand)

installing
patching script interpreter paths in .
./lambda-mod.zsh-theme: interpreter directive changed from "/usr/bin/env zsh" to "/nix/store/l322yvzki4qlkjlfqfinlxsqj0j6rpy5-zsh-5.5.1/bin/zsh"
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/lf2lyaq00lhfrlxyjgg8igxkl41lk8mg-lambda-mod-zsh-theme-unstable-2017-10-08
strip is /nix/store/0pjsgkxz0rp5baycq5sp2s72lrr5q9sg-binutils-2.30/bin/strip
patching script interpreter paths in /nix/store/lf2lyaq00lhfrlxyjgg8igxkl41lk8mg-lambda-mod-zsh-theme-unstable-2017-10-08
checking for references to /build in /nix/store/lf2lyaq00lhfrlxyjgg8igxkl41lk8mg-lambda-mod-zsh-theme-unstable-2017-10-08...
/nix/store/lf2lyaq00lhfrlxyjgg8igxkl41lk8mg-lambda-mod-zsh-theme-unstable-2017-10-08
/nix/store/kb9dzgvh70k3jfmvrnqmwzs5xkyzvmsf-nix-zsh-completions-0.4.0

cp _* $out/share/zsh/site-functions
installPhase = let
pluginDir = if ohMyZsh then "plugins/nix" else "share/zsh/site-functions";
compDir = if ohMyZsh then "completions" else "share/zsh/site-functions";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this way of packaging ohMyZsh plugins documented somewhere? I can't find anything else in nixpkgs using this, and it feels like that shouldn't be part of the package declaration, but rather of the code that wants to use the package (by wrapping the paths how ohmyzsh expects them or so).

default = null;
type = with types; nullOr str;
description = ''
List of custom packages that should be loaded into `oh-my-zsh`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The description is the same here as the new option below.

@@ -60,23 +68,32 @@ in
};
};

config = mkIf cfg.enable {
config = with builtins; mkIf cfg.enable (let
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

with builtins; can be removed, length and head are in lib.


custom = if cfg.custom != null then cfg.custom else
if length (cfg.customPkgs) == 0 then null else
if length (cfg.customPkgs) == 1 then head cfg.customPkgs else pkgs.buildEnv {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: Parens can be removed

@Ma27 Ma27 force-pushed the support-external-zsh-plugins branch 2 times, most recently from 140480b to 8ea9867 Compare August 3, 2018 22:19
@Ma27
Copy link
Member Author

Ma27 commented Aug 3, 2018

@infinisil thanks a lot for your review! I fixed all of it and solved theproblem with oh-my-zsh packages by adjusting an attr set in the passthru value of the corresponding derivation which maps out dirs to oh-my-zsh dirs to build proper packages, but provide information on how to structure the output in an oh-my-zsh environment.

@infinisil
Copy link
Member

Thanks, but I still don't think that's quiet right. (Asking because I'm not entirely sure:) So oh-my-zsh expects ZSH_CUSTOM to be set to a folder, containing subfolders for themes and completions. In completions there will be files like _foo for a completion for command foo, this is entirely usable with zsh and doesn't require oh-my-zsh and seems to be entirely what the $out/share/zsh/site-functions folder is dedicated for. In themes there seem to be themes also usable entirely by zsh itself, no oh-my-zsh needed, but there doesn't seem to be a dedicated folder for this. Is this correct?

If that's the case, then I suggest to dedicate a new folder $out/share/zsh/themes for zsh themes and make theme packages install stuff there (and potentially make it backwards compatible). Creating the zsh custom package can then look like this:

linkFarm "oh-my-zsh-custom" [
  {
    name = "themes";
    path = "${buildEnv {
      name = "oh-my-zsh-themes";
      paths = [ customPkgs ];
      pathsToLink = "/share/zsh/themes";
    }}/share/zsh/themes";
  }
  {
    name = "completions";
    path = "${buildEnv {
      name = "oh-my-zsh-completions";
      paths = [ customPkgs ];
      pathsToLink = "/share/zsh/site-functions";
    }}/share/zsh/site-functions";
  }
]

And a thing about the current state: {pre,post}Install hooks are usually not ran manually if not needed. I'm not exactly sure why, but almost aren't any derivations doing this in nixpkgs.

@Ma27
Copy link
Member Author

Ma27 commented Aug 4, 2018

Thanks for the review and the detailed feedback! I mostly agree with you, but now I have to catch some sleep, will have a deeper look at this tomorrow %)

@Ma27 Ma27 force-pushed the support-external-zsh-plugins branch from 8ea9867 to 5b11908 Compare August 5, 2018 09:40
@Ma27
Copy link
Member Author

Ma27 commented Aug 5, 2018

@infinisil fixed, thanks a lot for your feedback!

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: lambda-mod-zsh-theme, nix-zsh-completions

Partial log (click to expand)

installing
patching script interpreter paths in .
./lambda-mod.zsh-theme: interpreter directive changed from "/usr/bin/env zsh" to "/nix/store/9lfz6xj30b45xmyingcix77f3s1gp3ay-zsh-5.5.1/bin/zsh"
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/i9l5m6g8914hh3jlamzqglyizx5dmh99-lambda-mod-zsh-theme-unstable-2017-10-08
strip is /nix/store/1hi76hr87bd1y1q1qjk0lv8nmcjip1c8-binutils-2.30/bin/strip
patching script interpreter paths in /nix/store/i9l5m6g8914hh3jlamzqglyizx5dmh99-lambda-mod-zsh-theme-unstable-2017-10-08
checking for references to /build in /nix/store/i9l5m6g8914hh3jlamzqglyizx5dmh99-lambda-mod-zsh-theme-unstable-2017-10-08...
/nix/store/i9l5m6g8914hh3jlamzqglyizx5dmh99-lambda-mod-zsh-theme-unstable-2017-10-08
/nix/store/1jn5b5zysxxg8yx1b45605mq6r1gnsic-nix-zsh-completions-0.4.0

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: lambda-mod-zsh-theme, nix-zsh-completions

Partial log (click to expand)

installing
patching script interpreter paths in .
./lambda-mod.zsh-theme: interpreter directive changed from "/usr/bin/env zsh" to "/nix/store/86bybqzriqfihqic4bxghrj8ww2ljk1d-zsh-5.5.1/bin/zsh"
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/if5vldckglf5rvdl9b7pf2daiacjsikf-lambda-mod-zsh-theme-unstable-2017-10-08
strip is /nix/store/zrs21zqcchgyabjf4xfimncdq16njizc-binutils-2.30/bin/strip
patching script interpreter paths in /nix/store/if5vldckglf5rvdl9b7pf2daiacjsikf-lambda-mod-zsh-theme-unstable-2017-10-08
checking for references to /build in /nix/store/if5vldckglf5rvdl9b7pf2daiacjsikf-lambda-mod-zsh-theme-unstable-2017-10-08...
/nix/store/if5vldckglf5rvdl9b7pf2daiacjsikf-lambda-mod-zsh-theme-unstable-2017-10-08
/nix/store/nsq86kxmbgr5wwg6qfxv074py8l3y220-nix-zsh-completions-0.4.0

Copy link
Member

@infinisil infinisil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking much better! With this PR, these /share/zsh/{themes,site-functions,plugins/*} directories will probably become a convention for how to package zsh stuff on Nix, so I think it deserves an entry in the docs. Would you mind adding such an entry? Would be somewhere in the Nixpkgs manual. This would then be something we can link people to if they want to package zsh stuff and have it work with nixpkgs' conventions.

cp _* $out/share/zsh/site-functions
cp *.zsh $out/share/zsh/plugins/nix

runHook postInstall
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As previously mentioned, don't run these hooks manually here (for both derivations).


chmod +x lambda-mod.zsh-theme # only executable scripts are found by `patchShebangs`
patchShebangs .
chmod -x lambda-mod.zsh-theme
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's okay to let it stay executable, it is executable after all, especially since the shebang was patched.

@Ma27 Ma27 force-pushed the support-external-zsh-plugins branch from 5b11908 to 0794507 Compare August 5, 2018 15:09
@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: lambda-mod-zsh-theme, nix-zsh-completions

Partial log (click to expand)

building
no Makefile, doing nothing
installing
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/l2fbkaa0cgmfs4qx80hvllrlw29fy4mi-nix-zsh-completions-0.4.0
strip is /nix/store/1hi76hr87bd1y1q1qjk0lv8nmcjip1c8-binutils-2.30/bin/strip
patching script interpreter paths in /nix/store/l2fbkaa0cgmfs4qx80hvllrlw29fy4mi-nix-zsh-completions-0.4.0
checking for references to /build in /nix/store/l2fbkaa0cgmfs4qx80hvllrlw29fy4mi-nix-zsh-completions-0.4.0...
/nix/store/igq8lbcfcxmmkcsrcv39wr39n7wrr1pm-lambda-mod-zsh-theme-unstable-2017-10-08
/nix/store/l2fbkaa0cgmfs4qx80hvllrlw29fy4mi-nix-zsh-completions-0.4.0

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: lambda-mod-zsh-theme, nix-zsh-completions

Partial log (click to expand)

post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/c64wyvxa22pynl3mzp6waq28ndjm8wzx-lambda-mod-zsh-theme-unstable-2017-10-08
strip is /nix/store/zrs21zqcchgyabjf4xfimncdq16njizc-binutils-2.30/bin/strip
patching script interpreter paths in /nix/store/g5s02zis189wm8c1iyv8vgw8kj3lqlfk-nix-zsh-completions-0.4.0
strip is /nix/store/zrs21zqcchgyabjf4xfimncdq16njizc-binutils-2.30/bin/strip
patching script interpreter paths in /nix/store/c64wyvxa22pynl3mzp6waq28ndjm8wzx-lambda-mod-zsh-theme-unstable-2017-10-08
checking for references to /build in /nix/store/g5s02zis189wm8c1iyv8vgw8kj3lqlfk-nix-zsh-completions-0.4.0...
checking for references to /build in /nix/store/c64wyvxa22pynl3mzp6waq28ndjm8wzx-lambda-mod-zsh-theme-unstable-2017-10-08...
/nix/store/c64wyvxa22pynl3mzp6waq28ndjm8wzx-lambda-mod-zsh-theme-unstable-2017-10-08
/nix/store/g5s02zis189wm8c1iyv8vgw8kj3lqlfk-nix-zsh-completions-0.4.0

These files feature simple aliases and a nix-shell detector when using
`nix-shell --run zsh`. The package itself contains the completion scripts in
`$out/share/zsh/site-functions` (to keep it compatible with ZSH-only
setups) and the plugins in `$out/share/zsh/plugins` for oh-my-zsh.
This ensures that no impurity exists due to implicitly depending
on`/usr/bin/env`.

It stores the theme into `$out/share/zsh/themes` to make it possible to
find theme using `buildEnv` and remain consistent with other ZSH
extensions.
…s for `ZSH_CUSTOM`

If multiple third-party modules shall be used for `oh-my-zsh` it has to
be possible to create another env which composes all the packages.

Now it can be done like this:

```
{ pkgs, ... }:
{
  programs.zsh.enable = true;
  programs.zsh.ohMyZsh = {
    enable = true;
    customPkgs = with pkgs; [
      lambda-mod-zsh-theme
      nix-zsh-completions
    ];
    theme = "lambda-mod";
    plugins = [ "nix" ];
  };
}
```

Please keep in mind that this is not compatible with
`programs.zsh.ohMyZsh.custom`, only one of these options can be used
ATM.

Each package should store its outputs into
`$out/share/zsh/<output-name>`. Completions (and ZSH-only) extensions
should live in the `fpath` (`$out/share/zsh/site-functions`), plugins in
`.../plugins` and themes in `.../themes` (please refer to
fdb6bf6ed68c2f089ae6c729dfeaa3eddea2ce6a and 406d64aad162b3a4881747be4e24705fb5182573).

All scripts in `customPkgs` will be linked together using `linkFarm` to
provide a single directory for all scripts from all derivations in
`customPkgs` as suggested in NixOS#43282 (comment).
@Ma27 Ma27 force-pushed the support-external-zsh-plugins branch from 0794507 to 39b8545 Compare August 5, 2018 21:01
@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: lambda-mod-zsh-theme, nix-zsh-completions

Partial log (click to expand)

/nix/store/igq8lbcfcxmmkcsrcv39wr39n7wrr1pm-lambda-mod-zsh-theme-unstable-2017-10-08
/nix/store/l2fbkaa0cgmfs4qx80hvllrlw29fy4mi-nix-zsh-completions-0.4.0

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: lambda-mod-zsh-theme, nix-zsh-completions

Partial log (click to expand)

/nix/store/c64wyvxa22pynl3mzp6waq28ndjm8wzx-lambda-mod-zsh-theme-unstable-2017-10-08
/nix/store/g5s02zis189wm8c1iyv8vgw8kj3lqlfk-nix-zsh-completions-0.4.0

@Ma27
Copy link
Member Author

Ma27 commented Aug 6, 2018

cc @infinisil, are the latest changes better?

@infinisil
Copy link
Member

Yeah looking good now! Only thing that would be nice is some docs, documenting $out/share/zsh/{themes,site-functions,plugins}: What each of them is for, what the directories should look like. Currently only $out/share/zsh/site-functions is a "known" (but not documented?) convention, probably due to make installs populating that dir.

Adding docs should prevent anybody else trying to define some directory as a convention for themes/plugins. I think this may be the reason we currently need to support multiple of those for completions:

# Tell zsh how to find installed completions
for p in ''${(z)NIX_PROFILES}; do
fpath+=($p/share/zsh/site-functions $p/share/zsh/$ZSH_VERSION/functions $p/share/zsh/vendor-completions)
done
(or it might be because there already were multiple conventions for the make installs)

@Ma27
Copy link
Member Author

Ma27 commented Aug 6, 2018

great!

You're absolutely right, it could use some documentation, please give me some time to think how and where to write it, I'll report back, when it's done.

And thanks for your patience and feedback! :)

In the last year `programs.oh-my-zsh` gained more complexity and since
the introduction of features like `customPkgs` which builds a
`ZSH_CUSTOM` path from a sequence of derivation a documentation may be
fairly helpful to make the knowledge how to use the module and how to
package new ZSH plugins visible.

See NixOS#43282 (comment)
@Ma27
Copy link
Member Author

Ma27 commented Aug 7, 2018

@infinisil I added a docbook entry (using meta.doc) for oh-my-zsh. I thought it might be worth documenting the entire module and added one paragraph which describes how to package third-party oh-my-zsh extensions.

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: lambda-mod-zsh-theme, nix-zsh-completions

Partial log (click to expand)

installing
patching script interpreter paths in .
./lambda-mod.zsh-theme: interpreter directive changed from "/usr/bin/env zsh" to "/nix/store/86bybqzriqfihqic4bxghrj8ww2ljk1d-zsh-5.5.1/bin/zsh"
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/c64wyvxa22pynl3mzp6waq28ndjm8wzx-lambda-mod-zsh-theme-unstable-2017-10-08
strip is /nix/store/zrs21zqcchgyabjf4xfimncdq16njizc-binutils-2.30/bin/strip
patching script interpreter paths in /nix/store/c64wyvxa22pynl3mzp6waq28ndjm8wzx-lambda-mod-zsh-theme-unstable-2017-10-08
checking for references to /build in /nix/store/c64wyvxa22pynl3mzp6waq28ndjm8wzx-lambda-mod-zsh-theme-unstable-2017-10-08...
/nix/store/c64wyvxa22pynl3mzp6waq28ndjm8wzx-lambda-mod-zsh-theme-unstable-2017-10-08
/nix/store/g5s02zis189wm8c1iyv8vgw8kj3lqlfk-nix-zsh-completions-0.4.0

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: lambda-mod-zsh-theme, nix-zsh-completions

Partial log (click to expand)

installing
patching script interpreter paths in .
./lambda-mod.zsh-theme: interpreter directive changed from "/usr/bin/env zsh" to "/nix/store/9lfz6xj30b45xmyingcix77f3s1gp3ay-zsh-5.5.1/bin/zsh"
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/igq8lbcfcxmmkcsrcv39wr39n7wrr1pm-lambda-mod-zsh-theme-unstable-2017-10-08
strip is /nix/store/1hi76hr87bd1y1q1qjk0lv8nmcjip1c8-binutils-2.30/bin/strip
patching script interpreter paths in /nix/store/igq8lbcfcxmmkcsrcv39wr39n7wrr1pm-lambda-mod-zsh-theme-unstable-2017-10-08
checking for references to /build in /nix/store/igq8lbcfcxmmkcsrcv39wr39n7wrr1pm-lambda-mod-zsh-theme-unstable-2017-10-08...
/nix/store/igq8lbcfcxmmkcsrcv39wr39n7wrr1pm-lambda-mod-zsh-theme-unstable-2017-10-08
/nix/store/l2fbkaa0cgmfs4qx80hvllrlw29fy4mi-nix-zsh-completions-0.4.0

@infinisil
Copy link
Member

Neat! 2 things about the docs: It would be nice for them to be built into the nixpkgs docs, so it should probably be in nixpkgs/docs/manual. And as far as I know, all of the things in this document apply more generally to zsh, there's nothing oh-my-zsh specific, so I think this should be changed to reflect that.

Thanks for doing all this work :)

@Ma27
Copy link
Member Author

Ma27 commented Aug 7, 2018

It would be nice for them to be built into the nixpkgs docs

Care to elaborate? I just followed the convention to use meta.doc for module-specific documentation which will be rendered into the NixOS manual and I don't understand ATM why it's preferable to put it into the nixpkgs docs.

And as far as I know, all of the things in this document apply more generally to zsh, there's nothing oh-my-zsh specific, so I think this should be changed to reflect that.

Well, plugins are mostly oh-my-zsh specific and many (third-party) themes explicirtly depend on oh-my-zsh. I mentioned that packages should be kept compatible with zsh-only setups (if possible), but I'll re-read the paragraphs and think where we can make this more explicit.

However I'll wait with this until we have decided whether or not to move the docs to nixpkgs to finish all of this in a single iteration :)

@infinisil
Copy link
Member

Oh I see, yeah I didn't know about meta.doc actually, sorry! Then I don't have anything to say anymore, this looks good to me :)

@Ma27
Copy link
Member Author

Ma27 commented Aug 12, 2018

@infinisil any chance to get this merged?:)

@infinisil infinisil merged commit 8fb7ab9 into NixOS:master Aug 12, 2018
@Ma27 Ma27 deleted the support-external-zsh-plugins branch August 12, 2018 14:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants