From 3b50d0462a4174bb155b258a32ab1ab4176ba2fc Mon Sep 17 00:00:00 2001 From: Robin Gloster Date: Wed, 8 May 2019 00:42:47 +0200 Subject: [PATCH] perl: fuse configureFlags --- pkgs/development/interpreters/perl/default.nix | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/pkgs/development/interpreters/perl/default.nix b/pkgs/development/interpreters/perl/default.nix index 89979e18bdc6..49a5c38846aa 100644 --- a/pkgs/development/interpreters/perl/default.nix +++ b/pkgs/development/interpreters/perl/default.nix @@ -91,7 +91,13 @@ let ] ++ optionals ((builtins.match ''5\.[0-9]*[13579]\..+'' version) != null) [ "-Dusedevel" "-Uversiononly" ] ++ optional stdenv.isSunOS "-Dcc=gcc" - ++ optional enableThreading "-Dusethreads"; + ++ optional enableThreading "-Dusethreads" + ++ optionals (!crossCompiling) [ + "-Dprefix=${placeholder "out"}" + "-Dman1dir=${placeholder "out"}/share/man/man1" + "-Dman3dir=${placeholder "out"}/share/man/man3" + ] + ++ optional (stdenv.isAarch32 || stdenv.isMips) "-Dldflags=\"-lm -lrt\""; configureScript = optionalString (!crossCompiling) "${stdenv.shell} ./Configure"; @@ -102,10 +108,6 @@ let preConfigure = '' substituteInPlace ./Configure --replace '`LC_ALL=C; LANGUAGE=C; export LC_ALL; export LANGUAGE; $date 2>&1`' 'Thu Jan 1 00:00:01 UTC 1970' substituteInPlace ./Configure --replace '$uname -a' '$uname --kernel-name --machine --operating-system' - '' + optionalString (!crossCompiling) '' - configureFlags="$configureFlags -Dprefix=$out -Dman1dir=$out/share/man/man1 -Dman3dir=$out/share/man/man3" - '' + optionalString (stdenv.isAarch32 || stdenv.isMips) '' - configureFlagsArray=(-Dldflags="-lm -lrt") '' + optionalString stdenv.isDarwin '' substituteInPlace hints/darwin.sh --replace "env MACOSX_DEPLOYMENT_TARGET=10.3" "" '' + optionalString (!enableThreading) ''