Merge pull request #265738 from Artturin/patchshebangcon

stdenv: run patchShebangs on the configure script when it's a file
This commit is contained in:
Artturi 2023-11-26 01:28:41 +02:00 committed by GitHub
commit 4b27e14f8c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
23 changed files with 7 additions and 65 deletions

View File

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

View File

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

View File

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

View File

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

View File

@ -12,9 +12,4 @@ mkCoqDerivation {
release."20230107".sha256 = "sha256-YMBzVIsLkIC+w2TeyHrKe29eWLIxrH3wIMZqhik8p9I=";
release."20200131".rev = "203d4c20211d6b17741f1fdca46dbc091f5e961a";
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."20181102".rev = "82a85b7ec07e71fa6b30cfc05f6a7bfb09ef2510";
release."20181102".sha256 = "08zry20flgj7qq37xk32kzmg4fg6d4wi9m7pf9aph8fd3j2a0b5v";
preConfigure = ''
if [ -f ./configure ]; then
patchShebangs ./configure
fi
'';
}

View File

@ -24,9 +24,4 @@ mkCoqDerivation {
release."20181102".sha256 = "1vw47c37k5vaa8vbr6ryqy8riagngwcrfmb3rai37yi9xhdqg55z";
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=";
};
preConfigure = "patchShebangs ./configure.sh";
configureScript = "./configure.sh";
dontAddPrefix = true;

View File

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

View File

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

View File

@ -37,7 +37,7 @@ stdenv.mkDerivation rec {
doCheck = true; # not cross;
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

View File

@ -15,7 +15,7 @@ stdenv.mkDerivation rec {
for f in Makefile.in */Makefile; do
substituteInPlace "$f" --replace "CXX=g++" ""
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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1260,6 +1260,10 @@ configurePhase() {
prependToVar configureFlags --disable-static
fi
fi
if [ -z "${dontPatchShebangsInConfigure:-}" ]; then
patchShebangs --build "$configureScript"
fi
fi
if [ -n "$configureScript" ]; then

View File

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