treewide: remove unnecessary patching of configure script

The configure phase of `stdenv` now runs `patchShebangs` on
`configureScript`.

Did not remove `patchShebangs` in packages which override `configurePhase`
This commit is contained in:
Artturin 2023-11-06 04:44:32 +02:00
parent e68001550d
commit 20591326aa
22 changed files with 3 additions and 65 deletions

View file

@ -30,10 +30,6 @@ stdenv.mkDerivation rec {
libselinux libselinux
]; ];
postPatch = ''
patchShebangs ./configure
'';
postInstall = '' postInstall = ''
wrapProgram $out/bin/vis \ wrapProgram $out/bin/vis \
--prefix LUA_CPATH ';' "${luaEnv}/lib/lua/${lua.luaversion}/?.so" \ --prefix LUA_CPATH ';' "${luaEnv}/lib/lua/${lua.luaversion}/?.so" \

View file

@ -48,7 +48,7 @@ stdenv.mkDerivation (finalAttrs: {
sourceRoot = "${finalAttrs.src.name}/src"; sourceRoot = "${finalAttrs.src.name}/src";
postPatch = '' postPatch = ''
patchShebangs ./configure *.sh patchShebangs *.sh
''; '';
configureFlags = [ configureFlags = [

View file

@ -14,7 +14,6 @@ stdenv.mkDerivation rec {
outputDevdoc = "out"; outputDevdoc = "out";
preConfigure = " preConfigure = "
patchShebangs ./configure
patchShebangs ./do_install patchShebangs ./do_install
"; ";

View file

@ -14,9 +14,4 @@ mkCoqDerivation {
release."20200201".sha256 = "1h55s6lk47bk0lv5ralh81z55h799jbl9mhizmqwqzy57y8wqgs1"; release."20200201".sha256 = "1h55s6lk47bk0lv5ralh81z55h799jbl9mhizmqwqzy57y8wqgs1";
propagatedBuildInputs = [ StructTact ]; propagatedBuildInputs = [ StructTact ];
preConfigure = ''
if [ -f ./configure ]; then
patchShebangs ./configure
fi
'';
} }

View file

@ -12,9 +12,4 @@ mkCoqDerivation {
release."20230107".sha256 = "sha256-YMBzVIsLkIC+w2TeyHrKe29eWLIxrH3wIMZqhik8p9I="; release."20230107".sha256 = "sha256-YMBzVIsLkIC+w2TeyHrKe29eWLIxrH3wIMZqhik8p9I=";
release."20200131".rev = "203d4c20211d6b17741f1fdca46dbc091f5e961a"; release."20200131".rev = "203d4c20211d6b17741f1fdca46dbc091f5e961a";
release."20200131".sha256 = "0xylkdmb2dqnnqinf3pigz4mf4zmczcbpjnn59g5g76m7f2cqxl0"; release."20200131".sha256 = "0xylkdmb2dqnnqinf3pigz4mf4zmczcbpjnn59g5g76m7f2cqxl0";
preConfigure = ''
if [ -f ./configure ]; then
patchShebangs ./configure
fi
'';
} }

View file

@ -15,9 +15,4 @@ mkCoqDerivation {
release."20210328".sha256 = "sha256:1y5r1zm3hli10ah6lnj7n8hxad6rb6rgldd0g7m2fjibzvwqzhdg"; release."20210328".sha256 = "sha256:1y5r1zm3hli10ah6lnj7n8hxad6rb6rgldd0g7m2fjibzvwqzhdg";
release."20181102".rev = "82a85b7ec07e71fa6b30cfc05f6a7bfb09ef2510"; release."20181102".rev = "82a85b7ec07e71fa6b30cfc05f6a7bfb09ef2510";
release."20181102".sha256 = "08zry20flgj7qq37xk32kzmg4fg6d4wi9m7pf9aph8fd3j2a0b5v"; release."20181102".sha256 = "08zry20flgj7qq37xk32kzmg4fg6d4wi9m7pf9aph8fd3j2a0b5v";
preConfigure = ''
if [ -f ./configure ]; then
patchShebangs ./configure
fi
'';
} }

View file

@ -24,9 +24,4 @@ mkCoqDerivation {
release."20181102".sha256 = "1vw47c37k5vaa8vbr6ryqy8riagngwcrfmb3rai37yi9xhdqg55z"; release."20181102".sha256 = "1vw47c37k5vaa8vbr6ryqy8riagngwcrfmb3rai37yi9xhdqg55z";
propagatedBuildInputs = [ Cheerios InfSeqExt ssreflect ]; propagatedBuildInputs = [ Cheerios InfSeqExt ssreflect ];
preConfigure = ''
if [ -f ./configure ]; then
patchShebangs ./configure
fi
'';
} }

View file

@ -17,7 +17,6 @@ mkCoqDerivation rec {
"8.18.0".sha256 = "sha256-ow3mfarZ1PvBGf5WLnI8LdF3E+8A6fN7cOcXHrZJLo0="; "8.18.0".sha256 = "sha256-ow3mfarZ1PvBGf5WLnI8LdF3E+8A6fN7cOcXHrZJLo0=";
}; };
preConfigure = "patchShebangs ./configure.sh";
configureScript = "./configure.sh"; configureScript = "./configure.sh";
dontAddPrefix = true; dontAddPrefix = true;

View file

@ -48,7 +48,6 @@ let
propagatedBuildInputs = [ equations coq.ocamlPackages.zarith ] ++ metacoq-deps; propagatedBuildInputs = [ equations coq.ocamlPackages.zarith ] ++ metacoq-deps;
patchPhase = '' patchPhase = ''
patchShebangs ./configure.sh
patchShebangs ./template-coq/update_plugin.sh patchShebangs ./template-coq/update_plugin.sh
patchShebangs ./template-coq/gen-src/to-lower.sh patchShebangs ./template-coq/gen-src/to-lower.sh
patchShebangs ./pcuic/clean_extraction.sh patchShebangs ./pcuic/clean_extraction.sh

View file

@ -31,9 +31,6 @@ stdenv.mkDerivation rec {
sha256 = "005d993xcac8236fpvd1iawkz4wqjybkpn8dbwaliqz5jfkidlyn"; sha256 = "005d993xcac8236fpvd1iawkz4wqjybkpn8dbwaliqz5jfkidlyn";
}; };
# make: *** No rule to make target 'build/*.lo', needed by 'build/libSDL.la'. Stop.
postPatch = "patchShebangs ./configure";
outputs = [ "out" "dev" ]; outputs = [ "out" "dev" ];
outputBin = "dev"; # sdl-config outputBin = "dev"; # sdl-config

View file

@ -37,7 +37,7 @@ stdenv.mkDerivation rec {
doCheck = true; # not cross; doCheck = true; # not cross;
preCheck = '' preCheck = ''
patchShebangs ./configure ./run.sh ./test-driver-wrapper.sh patchShebangs ./run.sh ./test-driver-wrapper.sh
''; '';
# CMake files incorrectly calculate library path from dev prefix # CMake files incorrectly calculate library path from dev prefix

View file

@ -15,7 +15,7 @@ stdenv.mkDerivation rec {
for f in Makefile.in */Makefile; do for f in Makefile.in */Makefile; do
substituteInPlace "$f" --replace "CXX=g++" "" substituteInPlace "$f" --replace "CXX=g++" ""
done done
patchShebangs ./configure ./utils/check.sh ./utils/install-sh patchShebangs ./utils/check.sh ./utils/install-sh
''; '';
# Written in shell manually, does not support autoconf-style # Written in shell manually, does not support autoconf-style

View file

@ -13,10 +13,6 @@ stdenv.mkDerivation rec {
++ lib.optionals stdenv.isDarwin [ fixDarwinDylibNames ]; ++ lib.optionals stdenv.isDarwin [ fixDarwinDylibNames ];
buildInputs = [ boost fastjet hepmc zlib lhapdf ]; buildInputs = [ boost fastjet hepmc zlib lhapdf ];
preConfigure = ''
patchShebangs ./configure
'';
configureFlags = [ configureFlags = [
"--enable-shared" "--enable-shared"
"--with-lhapdf6=${lhapdf}" "--with-lhapdf6=${lhapdf}"

View file

@ -30,8 +30,6 @@ stdenv.mkDerivation rec {
createFindlibDestdir = true; createFindlibDestdir = true;
preConfigure = "patchShebangs ./configure.sh";
configureScript = "./configure.sh"; configureScript = "./configure.sh";
dontAddPrefix = "true"; dontAddPrefix = "true";
dontAddStaticConfigureFlags = true; dontAddStaticConfigureFlags = true;

View file

@ -29,8 +29,6 @@ stdenv.mkDerivation {
createFindlibDestdir = true; createFindlibDestdir = true;
preConfigure = "patchShebangs ./configure.sh";
configureScript = "./configure.sh"; configureScript = "./configure.sh";
dontAddPrefix = "true"; dontAddPrefix = "true";
dontAddStaticConfigureFlags = true; dontAddStaticConfigureFlags = true;

View file

@ -16,10 +16,6 @@ stdenv.mkDerivation rec {
buildInputs = [ zlib rdkafka yajl avro-c libserdes ]; buildInputs = [ zlib rdkafka yajl avro-c libserdes ];
preConfigure = ''
patchShebangs ./configure
'';
meta = with lib; { meta = with lib; {
description = "A generic non-JVM producer and consumer for Apache Kafka"; description = "A generic non-JVM producer and consumer for Apache Kafka";
homepage = "https://github.com/edenhill/kcat"; homepage = "https://github.com/edenhill/kcat";

View file

@ -15,10 +15,6 @@ stdenv.mkDerivation rec {
hash = "sha256-liDm8lcHSdn9f/tNISRlnqEIcBtmusMplH0N4tW5Lgo="; hash = "sha256-liDm8lcHSdn9f/tNISRlnqEIcBtmusMplH0N4tW5Lgo=";
}; };
postPatch = ''
patchShebangs --build src/configure
'';
nativeBuildInputs = [ nativeBuildInputs = [
installShellFiles installShellFiles
]; ];

View file

@ -16,10 +16,6 @@ stdenv.mkDerivation rec {
hardeningDisable = [ "format" ]; hardeningDisable = [ "format" ];
preConfigure = ''
patchShebangs ./configure
'';
env.NIX_CFLAGS_COMPILE = "-fpermissive"; env.NIX_CFLAGS_COMPILE = "-fpermissive";
meta = { meta = {

View file

@ -61,10 +61,6 @@ stdenv.mkDerivation rec {
echo 'DRACUT_VERSION=${version}' >dracut-version.sh echo 'DRACUT_VERSION=${version}' >dracut-version.sh
''; '';
preConfigure = ''
patchShebangs ./configure
'';
postFixup = '' postFixup = ''
wrapProgram $out/bin/dracut --prefix PATH : ${lib.makeBinPath [ wrapProgram $out/bin/dracut --prefix PATH : ${lib.makeBinPath [
coreutils coreutils

View file

@ -11,10 +11,6 @@ stdenv.mkDerivation rec {
hash = "sha256-RvjYd8iD6JkGhh6TDy/Qo+UzLxbhPvIJvhl/Rw14lbk="; hash = "sha256-RvjYd8iD6JkGhh6TDy/Qo+UzLxbhPvIJvhl/Rw14lbk=";
}; };
postPatch = ''
patchShebangs ./configure
'';
configureFlags = [ "--datadir=${placeholder "out"}/share" ]; configureFlags = [ "--datadir=${placeholder "out"}/share" ];
doCheck = false; # this does build machine-specific checks (e.g. enumerates PCI bus) doCheck = false; # this does build machine-specific checks (e.g. enumerates PCI bus)

View file

@ -102,8 +102,6 @@ in stdenv.mkDerivation {
]; ];
preConfigure = '' preConfigure = ''
patchShebangs ./configure
substituteInPlace src/config.c \ substituteInPlace src/config.c \
--replace /usr/bin/tar ${gnutar}/bin/tar --replace /usr/bin/tar ${gnutar}/bin/tar

View file

@ -40,8 +40,6 @@ stdenv.mkDerivation rec {
substituteInPlace hooks/dhcpcd-run-hooks.in --replace /bin/sh ${runtimeShell} substituteInPlace hooks/dhcpcd-run-hooks.in --replace /bin/sh ${runtimeShell}
''; '';
preConfigure = "patchShebangs ./configure";
configureFlags = [ configureFlags = [
"--sysconfdir=/etc" "--sysconfdir=/etc"
"--localstatedir=/var" "--localstatedir=/var"