treewide: improve prepending and appending derivation arguments in bash code (#357052)
This commit is contained in:
@@ -28,13 +28,15 @@ mkDerivation rec {
|
||||
substituteInPlace fmit.pro --replace '$$FMITVERSIONGITPRO' '${version}'
|
||||
'';
|
||||
|
||||
preConfigure = ''
|
||||
qmakeFlags="$qmakeFlags \
|
||||
CONFIG+=${lib.optionalString alsaSupport "acs_alsa"} \
|
||||
CONFIG+=${lib.optionalString jackSupport "acs_jack"} \
|
||||
CONFIG+=${lib.optionalString portaudioSupport "acs_portaudio"} \
|
||||
PREFIXSHORTCUT=$out"
|
||||
'';
|
||||
qmakeFlags = [
|
||||
"PREFIXSHORTCUT=${placeholder "out"}"
|
||||
] ++ lib.optionals alsaSupport [
|
||||
"CONFIG+=acs_alsa"
|
||||
] ++ lib.optionals jackSupport [
|
||||
"CONFIG+=acs_jack"
|
||||
] ++ lib.optionals portaudioSupport [
|
||||
"CONFIG+=acs_portaudio"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Free Musical Instrument Tuner";
|
||||
|
||||
@@ -105,6 +105,7 @@ stdenv.mkDerivation rec {
|
||||
"-DUSE_SYSTEM_LIBS=ON"
|
||||
"-DBUILD_IMGUI_INTERFACE=${if withImGui then "ON" else "OFF"}"
|
||||
"-DWITH_QT_GUI_WEBENGINE=${if withTauWidget then "ON" else "OFF"}"
|
||||
"-DAPP_INSTALL_ROOT=${placeholder "out"}/app"
|
||||
];
|
||||
|
||||
doCheck = true;
|
||||
@@ -136,9 +137,6 @@ stdenv.mkDerivation rec {
|
||||
|
||||
# Prebuild Ruby vendored dependencies and Qt docs
|
||||
./linux-prebuild.sh -o
|
||||
|
||||
# Append CMake flag depending on the value of $out
|
||||
cmakeFlags+=" -DAPP_INSTALL_ROOT=$out/app"
|
||||
'';
|
||||
|
||||
postBuild = ''
|
||||
|
||||
@@ -18,7 +18,7 @@ mkDerivation {
|
||||
protobuf_21 qtscript qtsvg qtquickcontrols qtwebengine shared-mime-info krunner kparts
|
||||
knewstuff gpsd
|
||||
];
|
||||
preConfigure = ''
|
||||
cmakeFlags+=" -DINCLUDE_INSTALL_DIR=''${!outputDev}/include"
|
||||
'';
|
||||
cmakeFlags = [
|
||||
"-DINCLUDE_INSTALL_DIR=${placeholder "dev"}/include"
|
||||
];
|
||||
}
|
||||
|
||||
@@ -66,9 +66,9 @@ mkDerivation rec {
|
||||
wayland-scanner
|
||||
];
|
||||
|
||||
preConfigure = ''
|
||||
cmakeFlags+="-DQT5_PLUGINS_INSTALL_DIR=$out/$qtPluginPrefix"
|
||||
'';
|
||||
cmakeFlags = [
|
||||
"-DQT5_PLUGINS_INSTALL_DIR=${placeholder "out"}/$qtPluginPrefix"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Core libraries of Maliit and server";
|
||||
|
||||
@@ -63,12 +63,14 @@ stdenv.mkDerivation rec {
|
||||
|
||||
preConfigure = ''
|
||||
./_autosetup
|
||||
configureFlags="$configureFlags --sysconfdir=$out/etc"
|
||||
'';
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
configureFlags = [ "--disable-server" ] ++ lib.optionals headless [ "--disable-manager" ];
|
||||
configureFlags = [
|
||||
"--disable-server"
|
||||
"--sysconfdir=${placeholder "out"}/etc"
|
||||
] ++ lib.optionals headless [ "--disable-manager" ];
|
||||
|
||||
postInstall = ''
|
||||
install --mode=444 -D 'client/scripts/boinc-client.service' "$out/etc/systemd/system/boinc.service"
|
||||
|
||||
@@ -38,7 +38,7 @@ stdenv.mkDerivation rec {
|
||||
];
|
||||
|
||||
preConfigure = ''
|
||||
configureFlags="$configureFlags --with-lablgtk-dir=$(echo ${lablgtk}/lib/ocaml/*/site-lib/lablgtk2)"
|
||||
appendToVar configureFlags "--with-lablgtk-dir=$(echo ${lablgtk}/lib/ocaml/*/site-lib/lablgtk2)"
|
||||
'';
|
||||
|
||||
postInstall = ''
|
||||
|
||||
@@ -14,9 +14,12 @@ stdenv.mkDerivation rec {
|
||||
|
||||
preConfigure = ''
|
||||
autoconf
|
||||
makeFlags="$makeFlags PREFIX=$out"
|
||||
'';
|
||||
|
||||
makeFlags = [
|
||||
"PREFIX=${placeholder "out"}"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = ''
|
||||
A little C program that prints a short string with barebones information
|
||||
|
||||
@@ -214,10 +214,10 @@ in stdenv.mkDerivation (finalAttrs: {
|
||||
# Need these tools on the build system when cross compiling,
|
||||
# hacky, but have found no other way.
|
||||
CXX=$CXX_FOR_BUILD LD=ld make -C tools/depends/native/JsonSchemaBuilder
|
||||
cmakeFlags+=" -DWITH_JSONSCHEMABUILDER=$PWD/tools/depends/native/JsonSchemaBuilder/bin"
|
||||
appendToVar cmakeFlags "-DWITH_JSONSCHEMABUILDER=$PWD/tools/depends/native/JsonSchemaBuilder/bin"
|
||||
|
||||
CXX=$CXX_FOR_BUILD LD=ld make EXTRA_CONFIGURE= -C tools/depends/native/TexturePacker
|
||||
cmakeFlags+=" -DWITH_TEXTUREPACKER=$PWD/tools/depends/native/TexturePacker/bin"
|
||||
appendToVar cmakeFlags "-DWITH_TEXTUREPACKER=$PWD/tools/depends/native/TexturePacker/bin"
|
||||
'';
|
||||
|
||||
postPatch = ''
|
||||
|
||||
@@ -48,7 +48,7 @@ stdenv.mkDerivation (
|
||||
|
||||
# Prefix hackery because of a bug in stdenv (it tries to `mkdir
|
||||
# $prefix', which doesn't work due to the DESTDIR).
|
||||
configureFlags="--prefix=$prefix $configureFlags"
|
||||
prependToVar configureFlags "--prefix=$prefix"
|
||||
dontAddPrefix=1
|
||||
prefix=$TMPDIR/inst$prefix
|
||||
'';
|
||||
|
||||
@@ -9,10 +9,13 @@ stdenv.mkDerivation rec {
|
||||
};
|
||||
|
||||
preConfigure = ''
|
||||
export makeFlags="$makeFlags PREFIX='$out'"
|
||||
mkdir -p "$out/bin"
|
||||
'';
|
||||
|
||||
makeFlags = [
|
||||
"PREFIX=${placeholder "out"}"
|
||||
];
|
||||
|
||||
preBuild = ''
|
||||
sed -e 's/\t\t@/\t\t/g' -i Makefile
|
||||
'';
|
||||
|
||||
@@ -58,10 +58,8 @@ stdenv.mkDerivation {
|
||||
"RacketInclude=${racket}/include/racket"
|
||||
"RacketLib=${racket}/lib/racket"
|
||||
"DESTDIR=build"
|
||||
"Prefix=${placeholder "out"}"
|
||||
];
|
||||
configurePhase = ''
|
||||
sconsFlags+=" Prefix=$out"
|
||||
'';
|
||||
installPhase = ''
|
||||
mkdir -p $out
|
||||
cp -r build$out/* $out/
|
||||
|
||||
@@ -51,11 +51,11 @@ stdenv.mkDerivation rec {
|
||||
nativeBuildInputs = [ scons ];
|
||||
buildInputs = [ libGLU libGL SDL SDL_ttf SDL_image zlib SDL_net speex libvorbis libogg boost fribidi bsdiff ];
|
||||
|
||||
postConfigure = ''
|
||||
sconsFlags+=" BINDIR=$out/bin"
|
||||
sconsFlags+=" INSTALLDIR=$out/share/globulation2"
|
||||
sconsFlags+=" DATADIR=$out/share/globulation2/glob2"
|
||||
'';
|
||||
sconsFlags = [
|
||||
"BINDIR=${placeholder "out"}/bin"
|
||||
"INSTALLDIR=${placeholder "out"}/share/globulation2"
|
||||
"DATADIR=${placeholder "out"}/share/globulation2/glob2"
|
||||
];
|
||||
|
||||
NIX_LDFLAGS = "-lboost_system";
|
||||
|
||||
|
||||
@@ -89,9 +89,6 @@ stdenv.mkDerivation rec {
|
||||
sed -e "s|systemd_dir = .*|systemd_dir = '$out/lib/systemd/system'|" -i SConscript
|
||||
export TAR=noop
|
||||
substituteInPlace SConscript --replace "env['CCVERSION']" "env['CC']"
|
||||
|
||||
sconsFlags+=" udevdir=$out/lib/udev"
|
||||
sconsFlags+=" python_libdir=$out/${python3Packages.python.sitePackages}"
|
||||
'';
|
||||
|
||||
# - leapfetch=no disables going online at build time to fetch leap-seconds
|
||||
@@ -102,6 +99,8 @@ stdenv.mkDerivation rec {
|
||||
"gpsd_group=${gpsdGroup}"
|
||||
"systemd=yes"
|
||||
"xgps=${if guiSupport then "True" else "False"}"
|
||||
"udevdir=${placeholder "out"}/lib/udev"
|
||||
"python_libdir=${placeholder "out"}/${python3Packages.python.sitePackages}"
|
||||
];
|
||||
|
||||
preCheck = ''
|
||||
|
||||
@@ -13,9 +13,9 @@ stdenv.mkDerivation rec {
|
||||
sed 's/-o root -g root//' -i Makefile
|
||||
'';
|
||||
|
||||
preConfigure = ''
|
||||
makeFlags="$makeFlags PREFIX=$out"
|
||||
'';
|
||||
makeFlags = [
|
||||
"PREFIX=${placeholder "out"}"
|
||||
];
|
||||
|
||||
meta = {
|
||||
description = "Diff-capable 'du' browser";
|
||||
|
||||
@@ -12,9 +12,12 @@ stdenv.mkDerivation rec {
|
||||
postPatch = ''
|
||||
sed -i -e s,/usr/local,$out, -e s,/etc,$out/etc,g Makefile
|
||||
sed -i -e s,/usr/local,$out, mbuffer/Makefile
|
||||
makeFlags="$makeFlags PREFIX=$out"
|
||||
'';
|
||||
|
||||
makeFlags = [
|
||||
"PREFIX=${placeholder "out"}"
|
||||
];
|
||||
|
||||
preInstall = ''
|
||||
mkdir -p $out/man/man1 $out/bin $out/share $out/etc
|
||||
'';
|
||||
|
||||
@@ -16,7 +16,7 @@ stdenv.mkDerivation rec {
|
||||
];
|
||||
|
||||
preConfigure = ''
|
||||
cmakeFlags+="-Dabs_top_srcdir=$(readlink -f ./)"
|
||||
appendToVar cmakeFlags "-Dabs_top_srcdir=$(readlink -f ./)"
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [ cmake ninja ];
|
||||
|
||||
@@ -42,7 +42,8 @@ stdenv.mkDerivation rec {
|
||||
'';
|
||||
|
||||
configureFlags =
|
||||
[ "--enable-gss"
|
||||
[ "--with-start-statd=${placeholder "out"}/bin/start-statd"
|
||||
"--enable-gss"
|
||||
"--enable-svcgss"
|
||||
"--with-statedir=/var/lib/nfs"
|
||||
"--with-krb5=${lib.getLib libkrb5}"
|
||||
@@ -67,8 +68,6 @@ stdenv.mkDerivation rec {
|
||||
sed -i "s,/usr/sbin,$out/bin,g" utils/statd/statd.c
|
||||
sed -i "s,^PATH=.*,PATH=$out/bin:${statdPath}," utils/statd/start-statd
|
||||
|
||||
configureFlags="--with-start-statd=$out/bin/start-statd $configureFlags"
|
||||
|
||||
substituteInPlace systemd/nfs-utils.service \
|
||||
--replace "/bin/true" "${coreutils}/bin/true"
|
||||
|
||||
|
||||
@@ -124,7 +124,8 @@ stdenv.mkDerivation rec {
|
||||
|
||||
configurePhase = ''
|
||||
export GIT_VERSION=${builtins.substring 0 7 src.rev}
|
||||
buildFlags="$buildFlags ''${enableParallelBuilding:+-j$NIX_BUILD_CORES}"
|
||||
'' + optionalString enableParallelBuilding ''
|
||||
appendToVar buildFlags "-j$NIX_BUILD_CORES"
|
||||
'' + optionalString enableX11 ''
|
||||
cd x11
|
||||
substituteInPlace Makefile.am \
|
||||
|
||||
@@ -11,10 +11,12 @@ stdenv.mkDerivation rec {
|
||||
sha256 = "sha256-X842+xPjM404aQJTc2JwqU4vq8kgyKhpnqVu70pNLks=";
|
||||
};
|
||||
|
||||
makeFlags = [ "NO_INTERNET=1" ];
|
||||
makeFlags = [
|
||||
"NO_INTERNET=1"
|
||||
"PREFIX=${placeholder "out"}"
|
||||
];
|
||||
|
||||
preConfigure = ''
|
||||
export makeFlags="$makeFlags PREFIX=$out"
|
||||
patchShebangs tests/runtests.sh
|
||||
cd src
|
||||
'';
|
||||
|
||||
@@ -174,7 +174,7 @@ patchPpdFileCommands () {
|
||||
# The end result might contain too many
|
||||
# propagated dependencies for multi-output packages,
|
||||
# but never a broken package.
|
||||
propagatedBuildInputs+=("$path")
|
||||
appendToVar propagatedBuildInputs "$path"
|
||||
done < sorted-dependencies
|
||||
fi
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ stdenv.mkDerivation rec {
|
||||
mv pulseaudio-* pulseaudio-src
|
||||
chmod +w -Rv pulseaudio-src
|
||||
cp ${pulseaudio.dev}/include/pulse/config.h pulseaudio-src
|
||||
configureFlags="$configureFlags PULSE_DIR=$(realpath ./pulseaudio-src)"
|
||||
appendToVar configureFlags "PULSE_DIR=$(realpath ./pulseaudio-src)"
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
|
||||
@@ -32,7 +32,7 @@ stdenv.mkDerivation rec {
|
||||
|
||||
preBuild = ''
|
||||
dataDir="$out/share/rocksndiamonds"
|
||||
makeFlags+="BASE_PATH=$dataDir"
|
||||
appendToVar makeFlags "BASE_PATH=$dataDir"
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
|
||||
@@ -123,12 +123,12 @@ stdenv.mkDerivation rec {
|
||||
echo rt-${version} > .tag
|
||||
'';
|
||||
preConfigure = ''
|
||||
configureFlags="$configureFlags --with-web-user=$UID"
|
||||
configureFlags="$configureFlags --with-web-group=$(id -g)"
|
||||
configureFlags="$configureFlags --with-rt-group=$(id -g)"
|
||||
configureFlags="$configureFlags --with-bin-owner=$UID"
|
||||
configureFlags="$configureFlags --with-libs-owner=$UID"
|
||||
configureFlags="$configureFlags --with-libs-group=$(id -g)"
|
||||
appendToVar configureFlags "--with-web-user=$UID"
|
||||
appendToVar configureFlags "--with-web-group=$(id -g)"
|
||||
appendToVar configureFlags "--with-rt-group=$(id -g)"
|
||||
appendToVar configureFlags "--with-bin-owner=$UID"
|
||||
appendToVar configureFlags "--with-libs-owner=$UID"
|
||||
appendToVar configureFlags "--with-libs-group=$(id -g)"
|
||||
'';
|
||||
configureFlags = [
|
||||
"--enable-graphviz"
|
||||
|
||||
@@ -37,13 +37,13 @@ stdenv.mkDerivation rec {
|
||||
prefixKey = "PREFIX=";
|
||||
|
||||
preConfigure = ''
|
||||
sconsFlags+=" APR=$(echo ${apr.dev}/bin/*-config)"
|
||||
sconsFlags+=" APU=$(echo ${aprutil.dev}/bin/*-config)"
|
||||
sconsFlags+=" CC=$CC"
|
||||
sconsFlags+=" OPENSSL=${openssl}"
|
||||
sconsFlags+=" ZLIB=${zlib}"
|
||||
appendToVar sconsFlags "APR=$(echo ${apr.dev}/bin/*-config)"
|
||||
appendToVar sconsFlags "APU=$(echo ${aprutil.dev}/bin/*-config)"
|
||||
appendToVar sconsFlags "CC=$CC"
|
||||
appendToVar sconsFlags "OPENSSL=${openssl}"
|
||||
appendToVar sconsFlags "ZLIB=${zlib}"
|
||||
'' + lib.optionalString (!stdenv.hostPlatform.isCygwin) ''
|
||||
sconsFlags+=" GSSAPI=${libkrb5.dev}"
|
||||
appendToVar sconsFlags "GSSAPI=${libkrb5.dev}"
|
||||
'';
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
@@ -19,11 +19,11 @@ stdenv.mkDerivation rec {
|
||||
|
||||
hardeningDisable = [ "format" ];
|
||||
|
||||
configureFlags = [ "--with-ncurses=${ncurses.dev}" ];
|
||||
|
||||
preConfigure = lib.optionalString enablePlugin ''
|
||||
configureFlags="$configureFlags --with-silc-plugin=$out/lib/irssi"
|
||||
'';
|
||||
configureFlags = [
|
||||
"--with-ncurses=${ncurses.dev}"
|
||||
] ++ lib.optionals enablePlugin [
|
||||
"--with-silc-plugin=${placeholder "out"}/lib/irssi"
|
||||
];
|
||||
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
buildInputs = [ perl glib ncurses ];
|
||||
|
||||
@@ -30,12 +30,9 @@ stdenv.mkDerivation rec {
|
||||
|
||||
configureFlags = [
|
||||
"--with-bash-path=${pkgs.bash}/bin/bash"
|
||||
"--sysconfdir=${placeholder "out"}/etc"
|
||||
];
|
||||
|
||||
preConfigure = ''
|
||||
configureFlags="$configureFlags --sysconfdir=$out/etc"
|
||||
'';
|
||||
|
||||
postInstall = ''
|
||||
rm -f $out/etc/spacefm/spacefm.conf
|
||||
ln -s /etc/spacefm/spacefm.conf $out/etc/spacefm/spacefm.conf
|
||||
|
||||
@@ -32,9 +32,12 @@ stdenv.mkDerivation rec {
|
||||
|
||||
sed s,lSDL2main,lSDL2, -i GNUmakefile
|
||||
export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${SDL2.dev}/include/SDL2"
|
||||
export makeFlags="$makeFlags prefix=$out"
|
||||
'';
|
||||
|
||||
makeFlags = [
|
||||
"prefix=${placeholder "out"}"
|
||||
];
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
postInstall = ''
|
||||
|
||||
@@ -14,9 +14,12 @@ stdenv.mkDerivation rec {
|
||||
preConfigure = ''
|
||||
sed -i -e "s,\\\/usr,"$(echo $out|sed -e "s,\\/,\\\\\\\/,g")",g" tsocks
|
||||
substituteInPlace tsocks --replace /usr $out
|
||||
export configureFlags="$configureFlags --libdir=$out/lib"
|
||||
'';
|
||||
|
||||
configureFlags = [
|
||||
"--libdir=${placeholder "out"}/lib"
|
||||
];
|
||||
|
||||
preBuild = ''
|
||||
# We don't need the saveme binary, it is in fact never stored and we're
|
||||
# never injecting stuff into ld.so.preload anyway
|
||||
|
||||
@@ -140,7 +140,8 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
# Build libunbound again, but only against nettle instead of openssl.
|
||||
# This avoids gnutls.out -> unbound.lib -> lib.getLib openssl.
|
||||
''
|
||||
configureFlags="$configureFlags --with-nettle=${nettle.dev} --with-libunbound-only"
|
||||
appendToVar configureFlags "--with-nettle=${nettle.dev}"
|
||||
appendToVar configureFlags "--with-libunbound-only"
|
||||
configurePhase
|
||||
buildPhase
|
||||
if [ -n "$doCheck" ]; then
|
||||
|
||||
@@ -19,6 +19,7 @@ stdenv.mkDerivation rec {
|
||||
# fine via PAM without super user privileges.
|
||||
configureFlags =
|
||||
[ "--disable-setuid"
|
||||
"--enable-appdefaultdir=${placeholder "out"}/share/X11/app-defaults"
|
||||
] ++ (lib.optional (pam != null) "--enable-pam");
|
||||
|
||||
postPatch =
|
||||
@@ -27,7 +28,6 @@ stdenv.mkDerivation rec {
|
||||
in ''
|
||||
sed -i 's,\(for ac_dir in\),\1 ${inputs},' configure.ac
|
||||
sed -i 's,/usr/,/no-such-dir/,g' configure.ac
|
||||
configureFlags+=" --enable-appdefaultdir=$out/share/X11/app-defaults"
|
||||
'';
|
||||
|
||||
hardeningDisable = [ "format" ]; # no build output otherwise
|
||||
|
||||
@@ -17,12 +17,9 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
configureFlags = [
|
||||
"--with-layout=fhs-system"
|
||||
"--disable-install-p"
|
||||
"--with-config-file=${placeholder "out"}/etc/GNUstep/GNUstep.conf"
|
||||
];
|
||||
|
||||
preConfigure = ''
|
||||
configureFlags="$configureFlags --with-config-file=$out/etc/GNUstep/GNUstep.conf"
|
||||
'';
|
||||
|
||||
makeFlags = [
|
||||
"GNUSTEP_INSTALLATION_DOMAIN=SYSTEM"
|
||||
];
|
||||
|
||||
@@ -61,7 +61,7 @@ let
|
||||
postHooks+=("source @dev@/nix-support/setup-hook")
|
||||
else
|
||||
# Propagate $${out} output
|
||||
propagatedUserEnvPkgs+=" @${out}@"
|
||||
appendToVar propagatedUserEnvPkgs "@${out}@"
|
||||
|
||||
if [ -z "$outputDev" ]; then
|
||||
echo "error: \$outputDev is unset!" >&2
|
||||
@@ -71,7 +71,7 @@ let
|
||||
# Propagate $dev so that this setup hook is propagated
|
||||
# But only if there is a separate $dev output
|
||||
if [ "$outputDev" != out ]; then
|
||||
propagatedBuildInputs+=" @dev@"
|
||||
appendToVar propagatedBuildInputs "@dev@"
|
||||
fi
|
||||
fi
|
||||
'';
|
||||
|
||||
@@ -185,7 +185,7 @@ originalAttrs: (stdenv.mkDerivation (finalAttrs: originalAttrs // {
|
||||
mkdir -p ../mingw
|
||||
# --with-build-sysroot expects that:
|
||||
cp -R $libcCross/include ../mingw
|
||||
configureFlags="$configureFlags --with-build-sysroot=`pwd`/.."
|
||||
appendToVar configureFlags "--with-build-sysroot=`pwd`/.."
|
||||
fi
|
||||
|
||||
# Perform the build in a different directory.
|
||||
|
||||
@@ -112,7 +112,7 @@ propagateCudaLibraries() {
|
||||
local propagatedBuildInputs=( "${!cudaHostPathsSeen[@]}" )
|
||||
for output in $(getAllOutputNames) ; do
|
||||
if [[ ! "$output" = "$cudaPropagateToOutput" ]] ; then
|
||||
propagatedBuildInputs+=( "${!output}" )
|
||||
appendToVar propagatedBuildInputs "${!output}"
|
||||
fi
|
||||
break
|
||||
done
|
||||
|
||||
@@ -255,7 +255,7 @@ self: super: builtins.intersectAttrs super {
|
||||
jni = overrideCabal (drv: {
|
||||
preConfigure = ''
|
||||
local libdir=( "${pkgs.jdk}/lib/openjdk/jre/lib/"*"/server" )
|
||||
configureFlags+=" --extra-lib-dir=''${libdir[0]}"
|
||||
appendToVar configureFlags "--extra-lib-dir=''${libdir[0]}"
|
||||
'';
|
||||
}) super.jni;
|
||||
|
||||
|
||||
@@ -478,13 +478,13 @@ stdenv.mkDerivation ({
|
||||
for p in "''${pkgsHostHost[@]}" "''${pkgsHostTarget[@]}"; do
|
||||
${buildPkgDb ghc "$packageConfDir"}
|
||||
if [ -d "$p/include" ]; then
|
||||
configureFlags+=" --extra-include-dirs=$p/include"
|
||||
appendToVar configureFlags "--extra-include-dirs=$p/include"
|
||||
fi
|
||||
if [ -d "$p/lib" ]; then
|
||||
configureFlags+=" --extra-lib-dirs=$p/lib"
|
||||
appendToVar configureFlags "--extra-lib-dirs=$p/lib"
|
||||
fi
|
||||
if [[ -d "$p/Library/Frameworks" ]]; then
|
||||
configureFlags+=" --extra-framework-dirs=$p/Library/Frameworks"
|
||||
appendToVar configureFlags "--extra-framework-dirs=$p/Library/Frameworks"
|
||||
fi
|
||||
'' + ''
|
||||
done
|
||||
|
||||
@@ -83,7 +83,7 @@ in {
|
||||
generatePythonPackage {
|
||||
pname = "cyclic-dependencies";
|
||||
preFixup = ''
|
||||
propagatedBuildInputs+=("$out")
|
||||
appendToVar propagatedBuildInputs "$out"
|
||||
'';
|
||||
};
|
||||
|
||||
|
||||
@@ -224,6 +224,11 @@ stdenv.mkDerivation ({
|
||||
inherit sha256;
|
||||
};
|
||||
|
||||
makeFlags = lib.optionals (stdenv.cc.libc != null) [
|
||||
"BUILD_LDFLAGS=-Wl,-rpath,${stdenv.cc.libc}/lib"
|
||||
"OBJDUMP=${stdenv.cc.bintools.bintools}/bin/objdump"
|
||||
];
|
||||
|
||||
# Remove absolute paths from `configure' & co.; build out-of-tree.
|
||||
preConfigure = ''
|
||||
export PWD_P=$(type -tP pwd)
|
||||
@@ -237,12 +242,6 @@ stdenv.mkDerivation ({
|
||||
cd ../build
|
||||
|
||||
configureScript="`pwd`/../$sourceRoot/configure"
|
||||
|
||||
${lib.optionalString (stdenv.cc.libc != null)
|
||||
''makeFlags="$makeFlags BUILD_LDFLAGS=-Wl,-rpath,${stdenv.cc.libc}/lib OBJDUMP=${stdenv.cc.bintools.bintools}/bin/objdump"''
|
||||
}
|
||||
|
||||
|
||||
'' + lib.optionalString (stdenv.hostPlatform != stdenv.buildPlatform) ''
|
||||
sed -i s/-lgcc_eh//g "../$sourceRoot/Makeconfig"
|
||||
|
||||
|
||||
@@ -6,8 +6,8 @@ providesGrantleeRuntime() {
|
||||
|
||||
_grantleeEnvHook() {
|
||||
if providesGrantleeRuntime "$1"; then
|
||||
propagatedBuildInputs+=" $1"
|
||||
propagatedUserEnvPkgs+=" $1"
|
||||
appendToVar propagatedBuildInputs "$1"
|
||||
appendToVar propagatedUserEnvPkgs "$1"
|
||||
fi
|
||||
}
|
||||
addEnvHooks "$hostOffset" _grantleeEnvHook
|
||||
|
||||
@@ -52,7 +52,7 @@ let
|
||||
# Propagate $dev so that this setup hook is propagated
|
||||
# But only if there is a separate $dev output
|
||||
if [ "''${outputDev:?}" != out ]; then
|
||||
propagatedBuildInputs="''${propagatedBuildInputs-} @dev@"
|
||||
appendToVar propagatedBuildInputs "@dev@"
|
||||
fi
|
||||
fi
|
||||
'';
|
||||
|
||||
@@ -111,7 +111,7 @@ ecmHostPathHook() {
|
||||
|
||||
if [ -d "$1/dbus-1" ]
|
||||
then
|
||||
propagatedUserEnvPkgs+=" $1"
|
||||
appendToVar propagatedUserEnvPkgs "$1"
|
||||
fi
|
||||
}
|
||||
addEnvHooks "$targetOffset" ecmHostPathHook
|
||||
|
||||
@@ -62,9 +62,9 @@ stdenv.mkDerivation rec {
|
||||
dontWrapQtApps = true;
|
||||
|
||||
preConfigure = ''
|
||||
cmakeFlags+=" -DPHONON_QT_MKSPECS_INSTALL_DIR=''${!outputDev}/mkspecs"
|
||||
cmakeFlags+=" -DPHONON_QT_IMPORTS_INSTALL_DIR=''${!outputBin}/$qtQmlPrefix"
|
||||
cmakeFlags+=" -DPHONON_QT_PLUGIN_INSTALL_DIR=''${!outputBin}/$qtPluginPrefix/designer"
|
||||
appendToVar cmakeFlags "-DPHONON_QT_MKSPECS_INSTALL_DIR=''${!outputDev}/mkspecs"
|
||||
appendToVar cmakeFlags "-DPHONON_QT_IMPORTS_INSTALL_DIR=''${!outputBin}/$qtQmlPrefix"
|
||||
appendToVar cmakeFlags "-DPHONON_QT_PLUGIN_INSTALL_DIR=''${!outputBin}/$qtPluginPrefix/designer"
|
||||
'';
|
||||
|
||||
postPatch = ''
|
||||
|
||||
@@ -72,7 +72,7 @@ qtEnvHostTargetHook() {
|
||||
qtEnvHostTargetSeen[$1]=1
|
||||
if providesQtRuntime "$1" && [ "z${!outputBin}" != "z${!outputDev}" ]
|
||||
then
|
||||
propagatedBuildInputs+=" $1"
|
||||
appendToVar propagatedBuildInputs "$1"
|
||||
fi
|
||||
}
|
||||
envHostTargetHooks+=(qtEnvHostTargetHook)
|
||||
|
||||
@@ -101,14 +101,6 @@ clangStdenv.mkDerivation (finalAttrs: {
|
||||
})
|
||||
];
|
||||
|
||||
preConfigure = lib.optionalString (clangStdenv.hostPlatform != clangStdenv.buildPlatform) ''
|
||||
# Ignore gettext in cmake_prefix_path so that find_program doesn't
|
||||
# pick up the wrong gettext. TODO: Find a better solution for
|
||||
# this, maybe make cmake not look up executables in
|
||||
# CMAKE_PREFIX_PATH.
|
||||
cmakeFlags+=" -DCMAKE_IGNORE_PATH=${lib.getBin gettext}/bin"
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [
|
||||
bison
|
||||
cmake
|
||||
|
||||
@@ -126,7 +126,7 @@ buildPythonPackage rec {
|
||||
|
||||
# HACK: copy mesonEmulatorHook's flags to the variable used by meson-python
|
||||
postConfigure = ''
|
||||
mesonFlags="$mesonFlags ''${mesonFlagsArray[@]}"
|
||||
concatTo mesonFlags mesonFlagsArray
|
||||
'';
|
||||
|
||||
preBuild = ''
|
||||
|
||||
@@ -103,7 +103,7 @@ buildPythonPackage rec {
|
||||
|
||||
# HACK: copy mesonEmulatorHook's flags to the variable used by meson-python
|
||||
postConfigure = ''
|
||||
mesonFlags="$mesonFlags ''${mesonFlagsArray[@]}"
|
||||
concatTo mesonFlags mesonFlagsArray
|
||||
'';
|
||||
|
||||
buildInputs = [
|
||||
|
||||
@@ -17,7 +17,7 @@ stdenv.mkDerivation {
|
||||
"-C${kernel.dev}/lib/modules/${kernel.modDirVersion}/build"
|
||||
];
|
||||
postConfigure = ''
|
||||
makeFlags="$makeFlags M=$(pwd)"
|
||||
appendToVar makeFlags "M=$(pwd)"
|
||||
'';
|
||||
buildFlags = [ "modules" ];
|
||||
|
||||
|
||||
@@ -14,9 +14,12 @@ in stdenv.mkDerivation rec {
|
||||
preConfigure = ''
|
||||
sed -i 's|"/usr/include"|"${stdenv.cc.libc.dev}/include"|' pre-process.c
|
||||
sed -i 's|qx(\$ccom -print-file-name=)|"${GCC_BASE}"|' cgcc
|
||||
makeFlags+=" PREFIX=$out"
|
||||
'';
|
||||
|
||||
makeFlags = [
|
||||
"PREFIX=${placeholder "out"}"
|
||||
];
|
||||
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
buildInputs = [ gtk3 libxml2 llvm perl sqlite ];
|
||||
doCheck = true;
|
||||
|
||||
@@ -50,12 +50,12 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
lua -e "" || {
|
||||
luajit -e "" && {
|
||||
export LUA_SUFFIX=jit
|
||||
configureFlags="$configureFlags --lua-suffix=$LUA_SUFFIX"
|
||||
appendToVar configureFlags "--lua-suffix=$LUA_SUFFIX"
|
||||
}
|
||||
}
|
||||
lua_inc="$(echo "${lua}/include"/*/)"
|
||||
if test -n "$lua_inc"; then
|
||||
configureFlags="$configureFlags --with-lua-include=$lua_inc"
|
||||
appendToVar configureFlags "--with-lua-include=$lua_inc"
|
||||
fi
|
||||
'';
|
||||
|
||||
|
||||
@@ -107,7 +107,7 @@ ecmHostPathHook() {
|
||||
|
||||
if [ -d "$1/share/dbus-1" ]
|
||||
then
|
||||
propagatedUserEnvPkgs+=" $1"
|
||||
appendToVar propagatedUserEnvPkgs "$1"
|
||||
fi
|
||||
}
|
||||
addEnvHooks "$hostOffset" ecmHostPathHook
|
||||
|
||||
@@ -81,7 +81,7 @@ mkDerivation {
|
||||
'';
|
||||
|
||||
preInstall = ''
|
||||
makeFlags="$makeFlags ROOTDIR=$out/root"
|
||||
appendToVar makeFlags "ROOTDIR=$out/root"
|
||||
'';
|
||||
|
||||
outputs = [
|
||||
|
||||
@@ -136,12 +136,12 @@ in stdenv.mkDerivation rec {
|
||||
hardeningDisable = [ "fortify3" ];
|
||||
|
||||
preBuild = ''
|
||||
sconsFlags+=" CC=$CC"
|
||||
sconsFlags+=" CXX=$CXX"
|
||||
appendToVar sconsFlags "CC=$CC"
|
||||
appendToVar sconsFlags "CXX=$CXX"
|
||||
'' + lib.optionalString (!stdenv.hostPlatform.isDarwin) ''
|
||||
sconsFlags+=" AR=$AR"
|
||||
appendToVar sconsFlags "AR=$AR"
|
||||
'' + lib.optionalString stdenv.hostPlatform.isAarch64 ''
|
||||
sconsFlags+=" CCFLAGS='-march=armv8-a+crc'"
|
||||
appendToVar sconsFlags "CCFLAGS=-march=armv8-a+crc"
|
||||
'';
|
||||
|
||||
preInstall = ''
|
||||
|
||||
@@ -21,14 +21,14 @@ postInstall() {
|
||||
for p in "${pkgsHostHost[@]}" "${pkgsHostTarget[@]}"; do
|
||||
if test -e $p/lib/pkgconfig/$r.pc; then
|
||||
echo " found requisite $r in $p"
|
||||
propagatedBuildInputs+=" $p"
|
||||
appendToVar propagatedBuildInputs "$p"
|
||||
fi
|
||||
done
|
||||
done
|
||||
}
|
||||
|
||||
|
||||
installFlags="appdefaultdir=$out/share/X11/app-defaults $installFlags"
|
||||
prependToVar installFlags "appdefaultdir=$out/share/X11/app-defaults"
|
||||
|
||||
|
||||
if test -n "$x11BuildHook"; then
|
||||
|
||||
@@ -99,7 +99,7 @@ fi
|
||||
if test -f $rootNameBase.idx; then
|
||||
echo "MAKING INDEX..."
|
||||
if test -n "$compressBlanksInIndex"; then
|
||||
makeindexFlags="$makeindexFlags -c"
|
||||
appendToVar makeindexFlags "-c"
|
||||
fi
|
||||
makeindex $makeindexFlags $rootNameBase.idx
|
||||
runNeeded=1
|
||||
|
||||
Reference in New Issue
Block a user