git.iko.soy/typeable/nixpkgs
on master help sign in
zsh: Support building from Git checkouts

A pregenerated `./configure` script is included with `zsh` release tarballs which makes it so that `zsh` won't build Git checkouts without `autoreconfHook`. There are also other files that were pregenerated and included in releases so a few other tools are necessary to successfully build `zsh`. We can also build the docs ourselves instead of using the `docs` tarball. This means that users can now easily override the `zsh` derivation: pkgs.zsh.overrideAttrs (old: { src = fetchgit { url = "https://git.code.sf.net/p/zsh/code.git"; rev = "zsh-5.8"; sha256 = "sha256-Gou2UgafLHnZnG2X8DulidOTO1idTQpnZ3DicZuhCZc="; }; })

commit7ada385af0b5ca1ce6ed865a7b2fc7ce603e8831 authorMichael Hoang <enzime@users.noreply.github.com> dateSun 9 Jan 2022, 22:56 (5 years ago) parentff377a7
1 file changed+16−9
pkgs/shells/zsh/default.nix+16−9
pkgs/shells/zsh/default.nix+16−9
@@ -1,12 +1,19 @@
1−{ lib, stdenv, fetchurl, fetchpatch, ncurses, pcre, buildPackages }:
1+{ lib
2+, stdenv
3+, fetchurl
4+, fetchpatch
5+, autoreconfHook
6+, yodl
7+, perl
8+, groff
9+, util-linux
10+, texinfo
11+, ncurses
12+, pcre
13+, buildPackages }:
214
315let
416 version = "5.8";
5−
6− documentation = fetchurl {
7− url = "mirror://sourceforge/zsh/zsh-${version}-doc.tar.xz";
8− sha256 = "1i6wdzq6rfjx5yjrpzan1jf50hk2pfzy5qib9mb7cnnbjfar6klv";
9− };
1017in
1118
1219stdenv.mkDerivation {
@@ -30,6 +37,8 @@ stdenv.mkDerivation {
3037 })
3138 ];
3239
40+ nativeBuildInputs = [ autoreconfHook yodl perl groff util-linux texinfo ];
41+
3342 buildInputs = [ ncurses pcre ];
3443
3544 configureFlags = [
@@ -47,9 +56,7 @@ stdenv.mkDerivation {
4756
4857 # XXX: think/discuss about this, also with respect to nixos vs nix-on-X
4958 postInstall = ''
50− mkdir -p $out/share/info
51− tar xf ${documentation} -C $out/share
52− ln -s $out/share/zsh-*/Doc/zsh.info* $out/share/info/
59+ make install.info install.html
5360
5461 mkdir -p $out/etc/
5562 cat > $out/etc/zprofile <<EOF