about summary refs log tree commit diff
path: root/pkgs/shells/zsh/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/shells/zsh/default.nix')
-rw-r--r--pkgs/shells/zsh/default.nix30
1 files changed, 19 insertions, 11 deletions
diff --git a/pkgs/shells/zsh/default.nix b/pkgs/shells/zsh/default.nix
index e0fd68f13b606..71f95472bb44b 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,9 @@ stdenv.mkDerivation {
     })
   ];
 
+  nativeBuildInputs = [ autoreconfHook perl groff texinfo ]
+                      ++ lib.optionals stdenv.isLinux [ util-linux yodl ];
+
   buildInputs = [ ncurses pcre ];
 
   configureFlags = [
@@ -46,11 +56,9 @@ stdenv.mkDerivation {
   checkFlags = map (T: "TESTNUM=${T}") (lib.stringToCharacters "ABCDEVW");
 
   # 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/
-
+  postInstall = lib.optionalString stdenv.isLinux ''
+    make install.info install.html
+    '' + ''
     mkdir -p $out/etc/
     cat > $out/etc/zprofile <<EOF
 if test -e /etc/NIXOS; then