summary refs log tree commit diff
path: root/pkgs/shells
diff options
context:
space:
mode:
authorMichael Hoang <enzime@users.noreply.github.com>2022-01-09 22:56:36 +1100
committerMichael Hoang <enzime@users.noreply.github.com>2022-01-09 22:56:36 +1100
commit7ada385af0b5ca1ce6ed865a7b2fc7ce603e8831 (patch)
tree30b23b2f593cab5cf57ef3ab1cd8dd15aed8bac7 /pkgs/shells
parentff377a78794d412a35245e05428c8f95fef3951f (diff)
downloadnixpkgs-7ada385af0b5ca1ce6ed865a7b2fc7ce603e8831.tar
nixpkgs-7ada385af0b5ca1ce6ed865a7b2fc7ce603e8831.tar.gz
nixpkgs-7ada385af0b5ca1ce6ed865a7b2fc7ce603e8831.tar.bz2
nixpkgs-7ada385af0b5ca1ce6ed865a7b2fc7ce603e8831.tar.lz
nixpkgs-7ada385af0b5ca1ce6ed865a7b2fc7ce603e8831.tar.xz
nixpkgs-7ada385af0b5ca1ce6ed865a7b2fc7ce603e8831.tar.zst
nixpkgs-7ada385af0b5ca1ce6ed865a7b2fc7ce603e8831.zip
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=";
      };
    })
Diffstat (limited to 'pkgs/shells')
-rw-r--r--pkgs/shells/zsh/default.nix25
1 files changed, 16 insertions, 9 deletions
diff --git a/pkgs/shells/zsh/default.nix b/pkgs/shells/zsh/default.nix
index e0fd68f13b6..82124753505 100644
--- a/pkgs/shells/zsh/default.nix
+++ b/pkgs/shells/zsh/default.nix
@@ -1,12 +1,19 @@
-{ lib, stdenv, fetchurl, fetchpatch, ncurses, pcre, buildPackages }:
+{ lib
+, stdenv
+, fetchurl
+, fetchpatch
+, autoreconfHook
+, yodl
+, perl
+, groff
+, util-linux
+, texinfo
+, ncurses
+, pcre
+, buildPackages }:
 
 let
   version = "5.8";
-
-  documentation = fetchurl {
-    url = "mirror://sourceforge/zsh/zsh-${version}-doc.tar.xz";
-    sha256 = "1i6wdzq6rfjx5yjrpzan1jf50hk2pfzy5qib9mb7cnnbjfar6klv";
-  };
 in
 
 stdenv.mkDerivation {
@@ -30,6 +37,8 @@ stdenv.mkDerivation {
     })
   ];
 
+  nativeBuildInputs = [ autoreconfHook yodl perl groff util-linux texinfo ];
+
   buildInputs = [ ncurses pcre ];
 
   configureFlags = [
@@ -47,9 +56,7 @@ stdenv.mkDerivation {
 
   # XXX: think/discuss about this, also with respect to nixos vs nix-on-X
   postInstall = ''
-    mkdir -p $out/share/info
-    tar xf ${documentation} -C $out/share
-    ln -s $out/share/zsh-*/Doc/zsh.info* $out/share/info/
+    make install.info install.html
 
     mkdir -p $out/etc/
     cat > $out/etc/zprofile <<EOF