treewide: add preConfigure and postConfigure for configurePhase (#428560)

Changed files
+180
pkgs
by-name
ab
abcde
ai
aiger
ca
cg
cn
cnijfilter_4_00
da
daemontools
dl
dl-poly-classic-mpi
do
dorion
ec
ecdsatool
ed
edid-generator
fa
fast-downward
fr
fricas
ga
gatling
gi
gildas
gx
gxplugins-lv2
hd
hdr10plus
ht
httperf
il
illum
ki
kissat
la
latex2html
li
lingeling
liquidfun
mi
minivmac
nc
ncpamixer
ne
netevent
netsniff-ng
pa
parmetis
pm
pmccabe
pn
pngcrush
pngtoico
re
retrofe
sb
sbsigntool
sp
spectrojack
su
subread
te
teetertorture
tennix
uq
ve
vk
vkeybd
wa
wannier90
wi
wiggle
xf
xfractint
xp
xprintidle-ng
ze
zeroad-unwrapped
servers
home-assistant
custom-lovelace-modules
zigbee2mqtt-networkmap
+4
pkgs/by-name/ab/abcde/package.nix
···
# FIXME: This package does not support `distmp3', `eject', etc.
configurePhase = ''
+
runHook preConfigure
+
sed -i "s|^[[:blank:]]*prefix *=.*$|prefix = $out|g ;
s|^[[:blank:]]*etcdir *=.*$|etcdir = $out/etc|g ;
s|^[[:blank:]]*INSTALL *=.*$|INSTALL = install -c|g" \
···
substituteInPlace "abcde" \
--replace "/etc/abcde.conf" "$out/etc/abcde.conf"
+
+
runHook postConfigure
'';
nativeBuildInputs = [ makeWrapper ];
+4
pkgs/by-name/ai/aiger/package.nix
···
};
configurePhase = ''
+
runHook preConfigure
+
# Set up picosat, so we can build 'aigbmc'
mkdir ../picosat
ln -s ${picosat}/include/picosat/picosat.h ../picosat/picosat.h
ln -s ${picosat}/lib/picosat.o ../picosat/picosat.o
ln -s ${picosat}/share/picosat.version ../picosat/VERSION
./configure.sh
+
+
runHook postConfigure
'';
postBuild = ''
+4
pkgs/by-name/ca/caps/package.nix
···
};
configurePhase = ''
+
runHook preConfigure
+
echo "PREFIX = $out" > defines.make
+
+
runHook postConfigure
'';
meta = {
+4
pkgs/by-name/cg/cgui/package.nix
···
];
configurePhase = ''
+
runHook preConfigure
+
sh fix.sh unix
+
+
runHook postConfigure
'';
hardeningDisable = [ "format" ];
+4
pkgs/by-name/cn/cnijfilter_4_00/package.nix
···
'';
configurePhase = ''
+
runHook preConfigure
+
cd libs
./autogen.sh --prefix=$out
···
sed -e "s,cnijlgmon2_LDADD =,cnijlgmon2_LDADD = -L../../com/libs_bin${arch}," \
-i lgmon2/src/Makefile.am || die
+
+
runHook postConfigure
'';
preInstall = ''
+4
pkgs/by-name/da/daemontools/package.nix
···
nativeBuildInputs = [ installShellFiles ];
configurePhase = ''
+
runHook preConfigure
+
cd daemontools-${version}
sed -i -e '1 s_$_ -include ${glibc.dev}/include/errno.h_' src/conf-cc
···
sed -i -e "s_^PATH=.*_PATH=$src/daemontools-${version}/compile:''${PATH}_" src/rts.tests
cat ${glibc.dev}/include/errno.h
+
+
runHook postConfigure
'';
buildPhase = ''
+4
pkgs/by-name/dl/dl-poly-classic-mpi/package.nix
···
buildInputs = [ mpi ];
configurePhase = ''
+
runHook preConfigure
+
cd source
cp -v ../build/MakePAR Makefile
+
+
runHook postConfigure
'';
# https://gitlab.com/DL_POLY_Classic/dl_poly/-/blob/master/README
+4
pkgs/by-name/do/dorion/package.nix
···
'';
configurePhase = ''
+
runHook preConfigure
+
cmakeConfigurePhase
pnpmConfigHook
+
+
runHook postConfigure
'';
buildPhase = ''
+4
pkgs/by-name/ec/ecdsatool/package.nix
···
};
configurePhase = ''
+
runHook preConfigure
+
./autogen.sh
./configure --prefix=$out
+
+
runHook postConfigure
'';
patches = [
+4
pkgs/by-name/ed/edid-generator/package.nix
···
modelines = "";
configurePhase = ''
+
runHook preConfigure
+
test "$clean" != 1 || rm *x*.S
./modeline2edid - <"$modelinesPath"
···
cat "$file"
done
make clean
+
+
runHook postConfigure
'';
buildPhase = ''
+4
pkgs/by-name/fa/fast-downward/package.nix
···
cmakeFlags = lib.optionals osi.withCplex [ "-DDOWNWARD_CPLEX_ROOT=${cplex}/cplex" ];
configurePhase = ''
+
runHook preConfigure
+
python build.py release
+
+
runHook postConfigure
'';
postPatch = ''
+4
pkgs/by-name/fr/fricas/package.nix
···
# Remove when updating to next version
configurePhase = ''
+
runHook preConfigure
+
./configure --prefix=$out --with-lisp='sbcl --dynamic-space-size 3072'
+
+
runHook postConfigure
'';
dontStrip = true;
+4
pkgs/by-name/ga/gatling/package.nix
···
];
configurePhase = ''
+
runHook preConfigure
+
substituteInPlace Makefile --replace-fail "/usr/local" "$out"
substituteInPlace GNUmakefile --replace-fail "/opt/diet" "$out"
substituteInPlace tryalloca.c --replace-fail "main() {" "int main() {"
substituteInPlace trysocket.c --replace-fail "main() {" "int main() {"
+
+
runHook postConfigure
'';
buildPhase = ''
+4
pkgs/by-name/gi/gildas/package.nix
···
env.GAG_CPP = lib.optionalString stdenv.hostPlatform.isDarwin "${gfortran.outPath}/bin/cpp";
configurePhase = ''
+
runHook preConfigure
+
substituteInPlace admin/wrapper.sh --replace '%%OUT%%' $out
substituteInPlace admin/wrapper.sh --replace '%%PYTHONHOME%%' ${python3Env}
substituteInPlace utilities/main/gag-makedepend.pl --replace '/usr/bin/perl' ${perl}/bin/perl
source admin/gildas-env.sh -c gfortran -o openmp
echo "gag_doc: $out/share/doc/" >> kernel/etc/gag.dico.lcl
+
+
runHook postConfigure
'';
userExec = "astro class greg mapping sic";
+4
pkgs/by-name/gx/gxplugins-lv2/package.nix
···
installFlags = [ "INSTALL_DIR=$(out)/lib/lv2" ];
configurePhase = ''
+
runHook preConfigure
+
for i in GxBoobTube GxValveCaster; do
substituteInPlace $i.lv2/Makefile --replace "\$(shell which echo) -e" "echo -e"
done
+
+
runHook postConfigure
'';
meta = with lib; {
+4
pkgs/by-name/hd/hdr10plus/package.nix
···
];
configurePhase = ''
+
runHook preConfigure
+
# let stdenv handle stripping
export "CARGO_PROFILE_''${cargoBuildType@U}_STRIP"=false
prependToVar cargoCFlags -j "$NIX_BUILD_CORES"
+
+
runHook postConfigure
'';
buildPhase = ''
+4
pkgs/by-name/ht/httperf/package.nix
···
propagatedBuildInputs = [ openssl ];
configurePhase = ''
+
runHook preConfigure
+
autoreconf -i
mkdir -pv build
cd build
../configure
+
+
runHook postConfigure
'';
installPhase = ''
+4
pkgs/by-name/il/illum/package.nix
···
];
configurePhase = ''
+
runHook preConfigure
+
bash ./configure
+
+
runHook postConfigure
'';
installPhase = ''
+4
pkgs/by-name/ki/kissat/package.nix
···
setOutputFlags = false;
configurePhase = ''
+
runHook preConfigure
+
./configure
+
+
runHook postConfigure
'';
buildPhase = ''
+4
pkgs/by-name/la/latex2html/package.nix
···
nativeBuildInputs = [ makeWrapper ];
configurePhase = ''
+
runHook preConfigure
+
./configure \
--prefix="$out" \
--without-mktexlsr \
--with-texpath=$out/share/texmf/tex/latex/html
+
+
runHook postConfigure
'';
postInstall = ''
+4
pkgs/by-name/li/lingeling/package.nix
···
};
configurePhase = ''
+
runHook preConfigure
+
./configure.sh
# Rather than patch ./configure, just sneak in use of aiger here, since it
···
--replace-fail '$(AIGER)/aiger.o' '${aiger.lib}/lib/libaiger.a' \
--replace-fail '$(AIGER)/aiger.h' '${aiger.dev}/include/aiger.h' \
--replace-fail '-I$(AIGER)' '-I${aiger.dev}/include'
+
+
runHook postConfigure
'';
installPhase = ''
+4
pkgs/by-name/li/liquidfun/package.nix
···
'';
configurePhase = ''
+
runHook preConfigure
+
mkdir Build
cd Build;
cmake -DBOX2D_INSTALL=ON -DBOX2D_BUILD_SHARED=ON -DCMAKE_INSTALL_PREFIX=$out ..
+
+
runHook postConfigure
'';
meta = with lib; {
+4
pkgs/by-name/mi/minivmac/package.nix
···
makeFlags = [ "PREFIX=${placeholder "out"}" ];
configurePhase = ''
+
runHook preConfigure
+
${lib.getExe' buildPackages.stdenv.cc "cc"} setup/tool.c -o setup_t
./setup_t -t lx64 > setup.sh
···
substituteInPlace setup.sh --replace 'strip --strip-unneeded' '${stdenv.cc.targetPrefix}strip --strip-unneeded'
sh < ./setup.sh
+
+
runHook postConfigure
'';
installPhase = ''
+4
pkgs/by-name/nc/ncpamixer/package.nix
···
];
configurePhase = ''
+
runHook preConfigure
+
make PREFIX=$out USE_WIDE=1 RELEASE=1 build/Makefile
+
+
runHook postConfigure
'';
meta = with lib; {
+4
pkgs/by-name/ne/netevent/package.nix
···
];
configurePhase = ''
+
runHook preConfigure
+
export RST2MAN=rst2man
./configure
+
+
runHook postConfigure
'';
installPhase = ''
+4
pkgs/by-name/ne/netsniff-ng/package.nix
···
# ./configure is not autoGNU but some home-brewn magic
configurePhase = ''
+
runHook preConfigure
+
patchShebangs configure
substituteInPlace configure --replace "which" "command -v"
NACL_INC_DIR=${libsodium.dev}/include/sodium NACL_LIB=sodium ./configure
+
+
runHook postConfigure
'';
enableParallelBuilding = true;
+4
pkgs/by-name/pa/parmetis/package.nix
···
buildInputs = [ mpi ];
configurePhase = ''
+
runHook preConfigure
+
tar xf ${metis.src}
mv metis-* metis
make config metis_path=metis gklib_path=metis/GKlib prefix=$out
+
+
runHook postConfigure
'';
meta = with lib; {
+4
pkgs/by-name/pm/pmccabe/package.nix
···
env.NIX_CFLAGS_COMPILE = "-Wno-error=implicit-function-declaration";
configurePhase = ''
+
runHook preConfigure
+
sed -i -r Makefile \
-e 's,/usr/,/,g' \
-e "s,^DESTDIR =.*$,DESTDIR = $out," \
-e "s,^INSTALL = install.*$,INSTALL = install," \
-e "s,^all:.*$,all: \$(PROGS),"
+
+
runHook postConfigure
'';
checkPhase = "make test";
+4
pkgs/by-name/pn/pngcrush/package.nix
···
]; # gcc and/or clang compat
configurePhase = ''
+
runHook preConfigure
+
sed -i s,/usr,$out, Makefile
+
+
runHook postConfigure
'';
buildInputs = [ libpng ];
+4
pkgs/by-name/pn/pngtoico/package.nix
···
];
configurePhase = ''
+
runHook preConfigure
+
sed -i s,/usr/local,$out, Makefile
+
+
runHook postConfigure
'';
buildInputs = [ libpng ];
+4
pkgs/by-name/re/retrofe/package.nix
···
]);
configurePhase = ''
+
runHook preConfigure
+
cmake RetroFE/Source -BRetroFE/Build -DCMAKE_BUILD_TYPE=Release \
-DVERSION_MAJOR=0 -DVERSION_MINOR=0 -DVERSION_BUILD=0 \
+
+
runHook postConfigure
'';
buildPhase = ''
+4
pkgs/by-name/sb/sbsigntool/package.nix
···
];
configurePhase = ''
+
runHook preConfigure
+
substituteInPlace configure.ac --replace "@@NIX_GNUEFI@@" "${gnu-efi}"
lib/ccan.git/tools/create-ccan-tree --build-type=automake lib/ccan "talloc read_write_all build_assert array_size endian"
···
automake --add-missing -Wno-portability
./configure --prefix=$out
+
+
runHook postConfigure
'';
meta = with lib; {
+4
pkgs/by-name/sp/spectrojack/package.nix
···
gtk2
];
configurePhase = ''
+
runHook preConfigure
+
sed -i 's/.*home.*/#&/' ./Makefile
substituteInPlace ./Makefile \
--replace "/usr/share" "$out/usr/share"
+
+
runHook postConfigure
'';
installPhase = ''
install -Dm755 spectrojack $out/bin/spectrojack
+4
pkgs/by-name/su/subread/package.nix
···
];
configurePhase = ''
+
runHook preConfigure
+
cd src
cp Makefile.${if stdenv.hostPlatform.isLinux then "Linux" else "MacOS"} Makefile
+
+
runHook postConfigure
'';
makeFlags = [ "CC_EXEC=cc" ];
+4
pkgs/by-name/te/teetertorture/package.nix
···
];
configurePhase = ''
+
runHook preConfigure
+
sed -i s,data/,$out/share/teetertorture/, src/teetertorture.c
+
+
runHook postConfigure
'';
patchPhase = ''
+4
pkgs/by-name/te/tennix/package.nix
···
];
configurePhase = ''
+
runHook preConfigure
+
./configure --prefix $out
+
+
runHook postConfigure
'';
meta = with lib; {
+4
pkgs/by-name/uq/uqm/package.nix
···
# uqm has a 'unique' build system with a root script incidentally called
# 'build.sh'.
configurePhase = ''
+
runHook preConfigure
+
echo "INPUT_install_prefix_VALUE='$out'" >> config.state
echo "INPUT_install_bindir_VALUE='$out/bin'" >> config.state
echo "INPUT_install_libdir_VALUE='$out/lib'" >> config.state
echo "INPUT_install_sharedir_VALUE='$out/share'" >> config.state
PREFIX=$out ./build.sh uqm config
+
+
runHook postConfigure
'';
buildPhase = ''
+4
pkgs/by-name/ve/vep/package.nix
···
};
# PREFIX is important
configurePhase = ''
+
runHook preConfigure
+
perl Makefile.PL PREFIX=$out INSTALLDIRS=site
+
+
runHook postConfigure
'';
# Test do not work -- wrong include path
doCheck = false;
+4
pkgs/by-name/vk/vkeybd/package.nix
···
];
configurePhase = ''
+
runHook preConfigure
+
mkdir -p $out/bin
sed -e "s@/usr/local@$out@" -i Makefile
+
+
runHook postConfigure
'';
makeFlags = [
+4
pkgs/by-name/wa/wannier90/package.nix
···
'';
configurePhase = ''
+
runHook preConfigure
+
cp config/make.inc.gfort make.inc
+
+
runHook postConfigure
'';
buildFlags = [
+4
pkgs/by-name/wi/wiggle/package.nix
···
];
configurePhase = ''
+
runHook preConfigure
+
makeFlagsArray=( CFLAGS="-I. -O3"
STRIP="-s"
INSTALL="install"
···
MANDIR="$out/share/man"
)
patchShebangs .
+
+
runHook postConfigure
'';
meta = with lib; {
+4
pkgs/by-name/xf/xfractint/package.nix
···
];
configurePhase = ''
+
runHook preConfigure
+
sed -e 's@/usr/bin/@@' -i Makefile
+
+
runHook postConfigure
'';
makeFlags = [ "PREFIX=$(out)" ];
+4
pkgs/by-name/xp/xprintidle-ng/package.nix
···
];
configurePhase = ''
+
runHook preConfigure
+
./bootstrap --gnulib-srcdir=${gnulib}
./configure --prefix="$out"
+
+
runHook postConfigure
'';
buildInputs = [
+4
pkgs/by-name/ze/zeroad-unwrapped/package.nix
···
];
configurePhase = ''
+
runHook preConfigure
+
# Delete shipped libraries which we don't need.
rm -rf libraries/source/{cxxtest-4.4,nvtt,premake-core,spidermonkey,spirv-reflect}
···
# Move to the build directory.
pushd build/workspaces/gcc
+
+
runHook postConfigure
'';
enableParallelBuilding = true;
+4
pkgs/servers/home-assistant/custom-lovelace-modules/zigbee2mqtt-networkmap/package.nix
···
};
configurePhase = ''
+
runHook preConfigure
+
cp -r $node_modules node_modules
chmod +w node_modules
+
+
runHook postConfigure
'';
buildPhase = ''