Merge pull request #173325 from KAction/zsh-doc

This commit is contained in:
Sandro 2022-06-19 11:24:33 +02:00 committed by GitHub
commit baac374635
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -19,6 +19,7 @@ in
stdenv.mkDerivation { stdenv.mkDerivation {
pname = "zsh"; pname = "zsh";
inherit version; inherit version;
outputs = [ "out" "doc" "info" "man" ];
src = fetchurl { src = fetchurl {
url = "mirror://sourceforge/zsh/zsh-${version}.tar.xz"; url = "mirror://sourceforge/zsh/zsh-${version}.tar.xz";
@ -50,9 +51,8 @@ stdenv.mkDerivation {
checkFlags = map (T: "TESTNUM=${T}") (lib.stringToCharacters "ABCDEVW"); checkFlags = map (T: "TESTNUM=${T}") (lib.stringToCharacters "ABCDEVW");
# XXX: think/discuss about this, also with respect to nixos vs nix-on-X # XXX: think/discuss about this, also with respect to nixos vs nix-on-X
postInstall = lib.optionalString stdenv.isLinux '' postInstall = ''
make install.info install.html make install.info install.html
'' + ''
mkdir -p $out/etc/ mkdir -p $out/etc/
cat > $out/etc/zprofile <<EOF cat > $out/etc/zprofile <<EOF
if test -e /etc/NIXOS; then if test -e /etc/NIXOS; then
@ -84,6 +84,8 @@ EOF
mv $out/etc/zprofile $out/etc/zprofile_zwc_is_used mv $out/etc/zprofile $out/etc/zprofile_zwc_is_used
rm $out/bin/zsh-${version} rm $out/bin/zsh-${version}
mkdir -p $out/share/doc/
mv $out/share/zsh/htmldoc $out/share/doc/zsh-$version
''; '';
# XXX: patch zsh to take zwc if newer _or equal_ # XXX: patch zsh to take zwc if newer _or equal_