about summary refs log tree commit diff
path: root/pkgs/shells/zsh
diff options
context:
space:
mode:
authorJörg Thalheim <Mic92@users.noreply.github.com>2019-08-14 07:15:01 +0100
committerGitHub <noreply@github.com>2019-08-14 07:15:01 +0100
commitcf5f02b4bb52d3df1d1d8a4875155d4f077e8f56 (patch)
treea5e3fd024c281d0325c7cb74ed5741c7cd42d369 /pkgs/shells/zsh
parentb5facab0482f438aea96558205bb1e2fa372836c (diff)
parentd0887921b3ed3d488c1e2cff9fc1fe9c98daed60 (diff)
downloadnixlib-cf5f02b4bb52d3df1d1d8a4875155d4f077e8f56.tar
nixlib-cf5f02b4bb52d3df1d1d8a4875155d4f077e8f56.tar.gz
nixlib-cf5f02b4bb52d3df1d1d8a4875155d4f077e8f56.tar.bz2
nixlib-cf5f02b4bb52d3df1d1d8a4875155d4f077e8f56.tar.lz
nixlib-cf5f02b4bb52d3df1d1d8a4875155d4f077e8f56.tar.xz
nixlib-cf5f02b4bb52d3df1d1d8a4875155d4f077e8f56.tar.zst
nixlib-cf5f02b4bb52d3df1d1d8a4875155d4f077e8f56.zip
zsh/pth/zsync: cross fixes (#65780)
zsh/pth/zsync: cross fixes
Diffstat (limited to 'pkgs/shells/zsh')
-rw-r--r--pkgs/shells/zsh/default.nix9
1 files changed, 6 insertions, 3 deletions
diff --git a/pkgs/shells/zsh/default.nix b/pkgs/shells/zsh/default.nix
index b74b2fc43f30..e9458520bb49 100644
--- a/pkgs/shells/zsh/default.nix
+++ b/pkgs/shells/zsh/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, ncurses, pcre }:
+{ stdenv, fetchurl, ncurses, pcre, buildPackages }:
 
 let
   version = "5.7.1";
@@ -7,7 +7,6 @@ let
     url = "mirror://sourceforge/zsh/zsh-${version}-doc.tar.xz";
     sha256 = "1d1r88n1gfdavx4zy3svl1gljrvzim17jb2r834hafg2a016flrh";
   };
-
 in
 
 stdenv.mkDerivation {
@@ -61,7 +60,11 @@ else
   fi
 fi
 EOF
-    $out/bin/zsh -c "zcompile $out/etc/zprofile"
+    ${if stdenv.hostPlatform == stdenv.buildPlatform then ''
+      $out/bin/zsh -c "zcompile $out/etc/zprofile"
+    '' else ''
+      ${stdenv.lib.getBin buildPackages.zsh}/bin/zsh -c "zcompile $out/etc/zprofile"
+    ''}
     mv $out/etc/zprofile $out/etc/zprofile_zwc_is_used
   '';
   # XXX: patch zsh to take zwc if newer _or equal_