zsh: fix cross by using pkg-config to discover libpcre

The configure script calls pcre-config to find pcre however using
nativeBuildInputs for this meant that zsh found the native libraries.

weirdly only pkgsCross.armv7l-hf-multiplatform.zsh was failing and not
pkgsCross.aarch64-multiplatform.zsh
This commit is contained in:
MaxHearnden 2023-05-24 15:08:09 +01:00 committed by Artturin
parent f91ee3065d
commit 77f84f07c4

View file

@ -10,6 +10,7 @@
, texinfo , texinfo
, ncurses , ncurses
, pcre , pcre
, pkg-config
, buildPackages }: , buildPackages }:
let let
@ -32,7 +33,7 @@ stdenv.mkDerivation {
]; ];
strictDeps = true; strictDeps = true;
nativeBuildInputs = [ autoreconfHook perl groff texinfo pcre] nativeBuildInputs = [ autoreconfHook perl groff texinfo pkg-config ]
++ lib.optionals stdenv.isLinux [ util-linux yodl ]; ++ lib.optionals stdenv.isLinux [ util-linux yodl ];
buildInputs = [ ncurses pcre ]; buildInputs = [ ncurses pcre ];
@ -56,6 +57,11 @@ stdenv.mkDerivation {
"zsh_cv_sys_dynamic_strip_lib=yes" "zsh_cv_sys_dynamic_strip_lib=yes"
]; ];
preConfigure = ''
# use pkg-config instead of pcre-config
configureFlagsArray+=("PCRECONF=''${PKG_CONFIG} libpcre")
'';
# the zsh/zpty module is not available on hydra # the zsh/zpty module is not available on hydra
# so skip groups Y Z # so skip groups Y Z
checkFlags = map (T: "TESTNUM=${T}") (lib.stringToCharacters "ABCDEVW"); checkFlags = map (T: "TESTNUM=${T}") (lib.stringToCharacters "ABCDEVW");