From c01f509e4438fd50faae0fa0175277b7b16728dc Mon Sep 17 00:00:00 2001 From: Artturin Date: Thu, 8 Dec 2022 01:51:03 +0200 Subject: treewide: source .attrs in builders if theres a source $stdenv then this is needed for structuredAttrs --- nixos/modules/services/networking/ircd-hybrid/builder.sh | 1 + nixos/modules/services/web-servers/jboss/builder.sh | 1 + pkgs/applications/misc/adobe-reader/builder.sh | 1 + pkgs/applications/office/libreoffice/download-list-builder.sh | 1 + pkgs/build-support/fetchbzr/builder.sh | 1 + pkgs/build-support/fetchcvs/builder.sh | 1 + pkgs/build-support/fetchdarcs/builder.sh | 1 + pkgs/build-support/fetchdocker/fetchdocker-builder.sh | 3 ++- pkgs/build-support/fetchfossil/builder.sh | 1 + pkgs/build-support/fetchgit/builder.sh | 2 ++ pkgs/build-support/fetchhg/builder.sh | 1 + pkgs/build-support/fetchipfs/builder.sh | 1 + pkgs/build-support/fetchmtn/builder.sh | 1 + pkgs/build-support/fetchsvn/builder.sh | 1 + pkgs/build-support/fetchsvnssh/builder.sh | 1 + pkgs/build-support/fetchurl/builder.sh | 1 + pkgs/desktops/gnustep/make/builder.sh | 1 + pkgs/development/compilers/aspectj/builder.sh | 1 + pkgs/development/compilers/chicken/4/fetchegg/builder.sh | 1 + pkgs/development/compilers/chicken/5/fetchegg/builder.sh | 1 + pkgs/development/compilers/fpc/binary-builder-darwin.sh | 1 + pkgs/development/compilers/fpc/binary-builder.sh | 1 + pkgs/development/compilers/ios-cross-compile/9.2_builder.sh | 1 + pkgs/development/compilers/ocaml/builder.sh | 1 + pkgs/development/libraries/glibc/locales-builder.sh | 1 + pkgs/development/libraries/gtk-sharp/builder.sh | 1 + pkgs/development/libraries/wtk/builder.sh | 1 + pkgs/development/nim-packages/fetch-nimble/builder.sh | 1 + pkgs/development/perl-modules/generic/builder.sh | 4 +--- pkgs/development/tools/build-managers/apache-maven/builder.sh | 1 + pkgs/development/tools/build-managers/boot/builder.sh | 1 + pkgs/development/tools/misc/automake/builder.sh | 1 + pkgs/development/tools/parsing/antlr/builder.sh | 1 + pkgs/misc/cups/drivers/samsung/4.00.39/builder.sh | 1 + pkgs/os-specific/linux/nvidia-x11/builder.sh | 1 + pkgs/os-specific/linux/opengl/xorg-sys/builder.sh | 1 + pkgs/servers/http/tomcat/axis2/builder.sh | 1 + pkgs/servers/x11/xorg/builder.sh | 1 + pkgs/test/simple/builder.sh | 1 + pkgs/tools/typesetting/lout/builder.sh | 1 + 40 files changed, 42 insertions(+), 4 deletions(-) diff --git a/nixos/modules/services/networking/ircd-hybrid/builder.sh b/nixos/modules/services/networking/ircd-hybrid/builder.sh index 38312210df2..d9d2e4264df 100644 --- a/nixos/modules/services/networking/ircd-hybrid/builder.sh +++ b/nixos/modules/services/networking/ircd-hybrid/builder.sh @@ -1,3 +1,4 @@ +if [ -e .attrs.sh ]; then source .attrs.sh; fi source $stdenv/setup doSub() { diff --git a/nixos/modules/services/web-servers/jboss/builder.sh b/nixos/modules/services/web-servers/jboss/builder.sh index 0e5af324c13..ac573089cd5 100644 --- a/nixos/modules/services/web-servers/jboss/builder.sh +++ b/nixos/modules/services/web-servers/jboss/builder.sh @@ -1,5 +1,6 @@ set -e +if [ -e .attrs.sh ]; then source .attrs.sh; fi source $stdenv/setup mkdir -p $out/bin diff --git a/pkgs/applications/misc/adobe-reader/builder.sh b/pkgs/applications/misc/adobe-reader/builder.sh index 41281385c99..6047c082643 100644 --- a/pkgs/applications/misc/adobe-reader/builder.sh +++ b/pkgs/applications/misc/adobe-reader/builder.sh @@ -1,3 +1,4 @@ +if [ -e .attrs.sh ]; then source .attrs.sh; fi source $stdenv/setup echo "unpacking $src..." diff --git a/pkgs/applications/office/libreoffice/download-list-builder.sh b/pkgs/applications/office/libreoffice/download-list-builder.sh index c054e2c72cb..31cab28fd82 100644 --- a/pkgs/applications/office/libreoffice/download-list-builder.sh +++ b/pkgs/applications/office/libreoffice/download-list-builder.sh @@ -1,3 +1,4 @@ +if [ -e .attrs.sh ]; then source .attrs.sh; fi source $stdenv/setup tar --extract --file=$src libreoffice-$version/download.lst -O > $out diff --git a/pkgs/build-support/fetchbzr/builder.sh b/pkgs/build-support/fetchbzr/builder.sh index e424fd92d51..163f6fc60ee 100644 --- a/pkgs/build-support/fetchbzr/builder.sh +++ b/pkgs/build-support/fetchbzr/builder.sh @@ -1,3 +1,4 @@ +if [ -e .attrs.sh ]; then source .attrs.sh; fi source "$stdenv/setup" header "exporting \`$url' (revision $rev) into \`$out'" diff --git a/pkgs/build-support/fetchcvs/builder.sh b/pkgs/build-support/fetchcvs/builder.sh index fe1019aafc2..90363275b97 100644 --- a/pkgs/build-support/fetchcvs/builder.sh +++ b/pkgs/build-support/fetchcvs/builder.sh @@ -1,3 +1,4 @@ +if [ -e .attrs.sh ]; then source .attrs.sh; fi source $stdenv/setup (echo "#!$SHELL"; \ diff --git a/pkgs/build-support/fetchdarcs/builder.sh b/pkgs/build-support/fetchdarcs/builder.sh index 301deb98307..01885277050 100644 --- a/pkgs/build-support/fetchdarcs/builder.sh +++ b/pkgs/build-support/fetchdarcs/builder.sh @@ -1,3 +1,4 @@ +if [ -e .attrs.sh ]; then source .attrs.sh; fi source $stdenv/setup tagtext="" diff --git a/pkgs/build-support/fetchdocker/fetchdocker-builder.sh b/pkgs/build-support/fetchdocker/fetchdocker-builder.sh index 7443591e656..e5a1a61b78d 100644 --- a/pkgs/build-support/fetchdocker/fetchdocker-builder.sh +++ b/pkgs/build-support/fetchdocker/fetchdocker-builder.sh @@ -1,3 +1,4 @@ +if [ -e .attrs.sh ]; then source .attrs.sh; fi source "${stdenv}/setup" header "exporting ${repository}/${imageName} (tag: ${tag}) into ${out}" mkdir -p "${out}" @@ -8,7 +9,7 @@ cat < "${out}/compositeImage.sh" # Create a tar archive of a docker image's layers, docker image config # json, manifest.json, and repositories json; this streams directly to # stdout and is intended to be used in concert with docker load, i.e: -# +# # ${out}/compositeImage.sh | docker load # The first character follow the 's' command for sed becomes the diff --git a/pkgs/build-support/fetchfossil/builder.sh b/pkgs/build-support/fetchfossil/builder.sh index 5f08aca424f..009b23c406d 100644 --- a/pkgs/build-support/fetchfossil/builder.sh +++ b/pkgs/build-support/fetchfossil/builder.sh @@ -1,3 +1,4 @@ +if [ -e .attrs.sh ]; then source .attrs.sh; fi source $stdenv/setup header "Cloning Fossil $url [$rev] into $out" diff --git a/pkgs/build-support/fetchgit/builder.sh b/pkgs/build-support/fetchgit/builder.sh index 66b6c168e41..acb970639ab 100644 --- a/pkgs/build-support/fetchgit/builder.sh +++ b/pkgs/build-support/fetchgit/builder.sh @@ -2,6 +2,8 @@ # - no revision specified and remote has a HEAD which is used # - revision specified and remote has a HEAD # - revision specified and remote without HEAD +# +if [ -e .attrs.sh ]; then source .attrs.sh; fi source $stdenv/setup header "exporting $url (rev $rev) into $out" diff --git a/pkgs/build-support/fetchhg/builder.sh b/pkgs/build-support/fetchhg/builder.sh index 847f18fa597..cec0e441f22 100644 --- a/pkgs/build-support/fetchhg/builder.sh +++ b/pkgs/build-support/fetchhg/builder.sh @@ -1,3 +1,4 @@ +if [ -e .attrs.sh ]; then source .attrs.sh; fi source $stdenv/setup header "getting $url${rev:+ ($rev)} into $out" diff --git a/pkgs/build-support/fetchipfs/builder.sh b/pkgs/build-support/fetchipfs/builder.sh index 7a6a517566f..ca77962b538 100644 --- a/pkgs/build-support/fetchipfs/builder.sh +++ b/pkgs/build-support/fetchipfs/builder.sh @@ -1,3 +1,4 @@ +if [ -e .attrs.sh ]; then source .attrs.sh; fi source $stdenv/setup # Curl flags to handle redirects, not use EPSV, handle cookies for diff --git a/pkgs/build-support/fetchmtn/builder.sh b/pkgs/build-support/fetchmtn/builder.sh index 73eff9c2725..7db66730dab 100644 --- a/pkgs/build-support/fetchmtn/builder.sh +++ b/pkgs/build-support/fetchmtn/builder.sh @@ -1,3 +1,4 @@ +if [ -e .attrs.sh ]; then source .attrs.sh; fi source $stdenv/setup set -x diff --git a/pkgs/build-support/fetchsvn/builder.sh b/pkgs/build-support/fetchsvn/builder.sh index ed3e65f0769..b58e5a88b3c 100644 --- a/pkgs/build-support/fetchsvn/builder.sh +++ b/pkgs/build-support/fetchsvn/builder.sh @@ -1,3 +1,4 @@ +if [ -e .attrs.sh ]; then source .attrs.sh; fi source $stdenv/setup header "exporting $url (r$rev) into $out" diff --git a/pkgs/build-support/fetchsvnssh/builder.sh b/pkgs/build-support/fetchsvnssh/builder.sh index d9c6dc7da31..b0441299dd2 100644 --- a/pkgs/build-support/fetchsvnssh/builder.sh +++ b/pkgs/build-support/fetchsvnssh/builder.sh @@ -1,3 +1,4 @@ +if [ -e .attrs.sh ]; then source .attrs.sh; fi source $stdenv/setup header "exporting $url (r$rev) into $out" diff --git a/pkgs/build-support/fetchurl/builder.sh b/pkgs/build-support/fetchurl/builder.sh index 5ca09b6fc77..dd987f41b44 100644 --- a/pkgs/build-support/fetchurl/builder.sh +++ b/pkgs/build-support/fetchurl/builder.sh @@ -1,3 +1,4 @@ +if [ -e .attrs.sh ]; then source .attrs.sh; fi source $stdenv/setup source $mirrorsFile diff --git a/pkgs/desktops/gnustep/make/builder.sh b/pkgs/desktops/gnustep/make/builder.sh index 39bd7703828..e5c277e796a 100644 --- a/pkgs/desktops/gnustep/make/builder.sh +++ b/pkgs/desktops/gnustep/make/builder.sh @@ -1,3 +1,4 @@ +if [ -e .attrs.sh ]; then source .attrs.sh; fi source $stdenv/setup preConfigure() { diff --git a/pkgs/development/compilers/aspectj/builder.sh b/pkgs/development/compilers/aspectj/builder.sh index 3b439372004..7ea0a40d374 100755 --- a/pkgs/development/compilers/aspectj/builder.sh +++ b/pkgs/development/compilers/aspectj/builder.sh @@ -1,3 +1,4 @@ +if [ -e .attrs.sh ]; then source .attrs.sh; fi source $stdenv/setup export JAVA_HOME=$jre diff --git a/pkgs/development/compilers/chicken/4/fetchegg/builder.sh b/pkgs/development/compilers/chicken/4/fetchegg/builder.sh index 20466106309..5f41a36263a 100644 --- a/pkgs/development/compilers/chicken/4/fetchegg/builder.sh +++ b/pkgs/development/compilers/chicken/4/fetchegg/builder.sh @@ -1,3 +1,4 @@ +if [ -e .attrs.sh ]; then source .attrs.sh; fi source $stdenv/setup header "exporting egg ${eggName} (version $version) into $out" diff --git a/pkgs/development/compilers/chicken/5/fetchegg/builder.sh b/pkgs/development/compilers/chicken/5/fetchegg/builder.sh index d9adf510f22..f02e0175778 100644 --- a/pkgs/development/compilers/chicken/5/fetchegg/builder.sh +++ b/pkgs/development/compilers/chicken/5/fetchegg/builder.sh @@ -1,3 +1,4 @@ +if [ -e .attrs.sh ]; then source .attrs.sh; fi source $stdenv/setup header "exporting egg ${eggName} (version $version) into $out" diff --git a/pkgs/development/compilers/fpc/binary-builder-darwin.sh b/pkgs/development/compilers/fpc/binary-builder-darwin.sh index f9bdf18e7d6..39db0518281 100755 --- a/pkgs/development/compilers/fpc/binary-builder-darwin.sh +++ b/pkgs/development/compilers/fpc/binary-builder-darwin.sh @@ -1,3 +1,4 @@ +if [ -e .attrs.sh ]; then source .attrs.sh; fi source $stdenv/setup pkgdir=$(pwd)/pkg diff --git a/pkgs/development/compilers/fpc/binary-builder.sh b/pkgs/development/compilers/fpc/binary-builder.sh index 4308c1ed211..c471378c275 100755 --- a/pkgs/development/compilers/fpc/binary-builder.sh +++ b/pkgs/development/compilers/fpc/binary-builder.sh @@ -1,3 +1,4 @@ +if [ -e .attrs.sh ]; then source .attrs.sh; fi source $stdenv/setup tar xf $src diff --git a/pkgs/development/compilers/ios-cross-compile/9.2_builder.sh b/pkgs/development/compilers/ios-cross-compile/9.2_builder.sh index 68ba3ed3a92..47459664af0 100644 --- a/pkgs/development/compilers/ios-cross-compile/9.2_builder.sh +++ b/pkgs/development/compilers/ios-cross-compile/9.2_builder.sh @@ -1,4 +1,5 @@ # -*- shell-script -*- +if [ -e .attrs.sh ]; then source .attrs.sh; fi source $stdenv/setup function extract diff --git a/pkgs/development/compilers/ocaml/builder.sh b/pkgs/development/compilers/ocaml/builder.sh index a1807682d86..88acc0654cf 100644 --- a/pkgs/development/compilers/ocaml/builder.sh +++ b/pkgs/development/compilers/ocaml/builder.sh @@ -1,3 +1,4 @@ +if [ -e .attrs.sh ]; then source .attrs.sh; fi source $stdenv/setup configureFlags="-prefix $out $configureFlags" diff --git a/pkgs/development/libraries/glibc/locales-builder.sh b/pkgs/development/libraries/glibc/locales-builder.sh index d732e208fa2..d91f936c937 100644 --- a/pkgs/development/libraries/glibc/locales-builder.sh +++ b/pkgs/development/libraries/glibc/locales-builder.sh @@ -1,3 +1,4 @@ +if [ -e .attrs.sh ]; then source .attrs.sh; fi # Glibc cannot have itself in its RPATH. export NIX_NO_SELF_RPATH=1 diff --git a/pkgs/development/libraries/gtk-sharp/builder.sh b/pkgs/development/libraries/gtk-sharp/builder.sh index 4b8f757540b..73914495d6d 100644 --- a/pkgs/development/libraries/gtk-sharp/builder.sh +++ b/pkgs/development/libraries/gtk-sharp/builder.sh @@ -1,3 +1,4 @@ +if [ -e .attrs.sh ]; then source .attrs.sh; fi source $stdenv/setup genericBuild diff --git a/pkgs/development/libraries/wtk/builder.sh b/pkgs/development/libraries/wtk/builder.sh index 86f2719537c..c3ad173b093 100644 --- a/pkgs/development/libraries/wtk/builder.sh +++ b/pkgs/development/libraries/wtk/builder.sh @@ -1,3 +1,4 @@ +if [ -e .attrs.sh ]; then source .attrs.sh; fi source $stdenv/setup mkdir unzipped diff --git a/pkgs/development/nim-packages/fetch-nimble/builder.sh b/pkgs/development/nim-packages/fetch-nimble/builder.sh index 693ab339408..bc2f9bfc94f 100644 --- a/pkgs/development/nim-packages/fetch-nimble/builder.sh +++ b/pkgs/development/nim-packages/fetch-nimble/builder.sh @@ -1,3 +1,4 @@ +if [ -e .attrs.sh ]; then source .attrs.sh; fi source $stdenv/setup export HOME=$NIX_BUILD_TOP diff --git a/pkgs/development/perl-modules/generic/builder.sh b/pkgs/development/perl-modules/generic/builder.sh index e56d7ec10b2..110094ad8a4 100644 --- a/pkgs/development/perl-modules/generic/builder.sh +++ b/pkgs/development/perl-modules/generic/builder.sh @@ -1,6 +1,4 @@ -if [ -f .attrs.sh ]; then - . .attrs.sh -fi +if [ -e .attrs.sh ]; then source .attrs.sh; fi source $stdenv/setup PERL5LIB="$PERL5LIB${PERL5LIB:+:}$out/lib/perl5/site_perl" diff --git a/pkgs/development/tools/build-managers/apache-maven/builder.sh b/pkgs/development/tools/build-managers/apache-maven/builder.sh index dcc38b9ec74..96fe8ebfac2 100644 --- a/pkgs/development/tools/build-managers/apache-maven/builder.sh +++ b/pkgs/development/tools/build-managers/apache-maven/builder.sh @@ -1,3 +1,4 @@ +if [ -e .attrs.sh ]; then source .attrs.sh; fi source $stdenv/setup unpackPhase diff --git a/pkgs/development/tools/build-managers/boot/builder.sh b/pkgs/development/tools/build-managers/boot/builder.sh index c1481dc6a14..e007cbac958 100644 --- a/pkgs/development/tools/build-managers/boot/builder.sh +++ b/pkgs/development/tools/build-managers/boot/builder.sh @@ -1,3 +1,4 @@ +if [ -e .attrs.sh ]; then source .attrs.sh; fi source $stdenv/setup boot_bin=$out/bin/boot diff --git a/pkgs/development/tools/misc/automake/builder.sh b/pkgs/development/tools/misc/automake/builder.sh index e54a2acca67..0cb1d5d61e3 100644 --- a/pkgs/development/tools/misc/automake/builder.sh +++ b/pkgs/development/tools/misc/automake/builder.sh @@ -1,3 +1,4 @@ +if [ -e .attrs.sh ]; then source .attrs.sh; fi source $stdenv/setup # Wrap the given `aclocal' program, appending extra `-I' flags diff --git a/pkgs/development/tools/parsing/antlr/builder.sh b/pkgs/development/tools/parsing/antlr/builder.sh index b8e7791b6fc..55259b93212 100644 --- a/pkgs/development/tools/parsing/antlr/builder.sh +++ b/pkgs/development/tools/parsing/antlr/builder.sh @@ -1,3 +1,4 @@ +if [ -e .attrs.sh ]; then source .attrs.sh; fi source $stdenv/setup tar zxvf $src diff --git a/pkgs/misc/cups/drivers/samsung/4.00.39/builder.sh b/pkgs/misc/cups/drivers/samsung/4.00.39/builder.sh index f750df6e506..bdb52274418 100644 --- a/pkgs/misc/cups/drivers/samsung/4.00.39/builder.sh +++ b/pkgs/misc/cups/drivers/samsung/4.00.39/builder.sh @@ -1,3 +1,4 @@ +if [ -e .attrs.sh ]; then source .attrs.sh; fi source $stdenv/setup arch=$(uname -m) diff --git a/pkgs/os-specific/linux/nvidia-x11/builder.sh b/pkgs/os-specific/linux/nvidia-x11/builder.sh index eadf88fd116..1cf1400f996 100755 --- a/pkgs/os-specific/linux/nvidia-x11/builder.sh +++ b/pkgs/os-specific/linux/nvidia-x11/builder.sh @@ -1,3 +1,4 @@ +if [ -e .attrs.sh ]; then source .attrs.sh; fi source $stdenv/setup unpackManually() { diff --git a/pkgs/os-specific/linux/opengl/xorg-sys/builder.sh b/pkgs/os-specific/linux/opengl/xorg-sys/builder.sh index cd21899e60e..34f9b157945 100644 --- a/pkgs/os-specific/linux/opengl/xorg-sys/builder.sh +++ b/pkgs/os-specific/linux/opengl/xorg-sys/builder.sh @@ -1,3 +1,4 @@ +if [ -e .attrs.sh ]; then source .attrs.sh; fi source $stdenv/setup mkdir -p $out/lib diff --git a/pkgs/servers/http/tomcat/axis2/builder.sh b/pkgs/servers/http/tomcat/axis2/builder.sh index 2e36367e9dc..d334ab6f927 100644 --- a/pkgs/servers/http/tomcat/axis2/builder.sh +++ b/pkgs/servers/http/tomcat/axis2/builder.sh @@ -1,3 +1,4 @@ +if [ -e .attrs.sh ]; then source .attrs.sh; fi source $stdenv/setup unzip $src diff --git a/pkgs/servers/x11/xorg/builder.sh b/pkgs/servers/x11/xorg/builder.sh index 5a832cb14d5..9ee81091584 100644 --- a/pkgs/servers/x11/xorg/builder.sh +++ b/pkgs/servers/x11/xorg/builder.sh @@ -1,3 +1,4 @@ +if [ -e .attrs.sh ]; then source .attrs.sh; fi # This is the builder for all X.org components. source $stdenv/setup diff --git a/pkgs/test/simple/builder.sh b/pkgs/test/simple/builder.sh index 65f7e4c11ba..908faec3c38 100644 --- a/pkgs/test/simple/builder.sh +++ b/pkgs/test/simple/builder.sh @@ -1,3 +1,4 @@ +if [ -e .attrs.sh ]; then source .attrs.sh; fi set -x export NIX_DEBUG=1 diff --git a/pkgs/tools/typesetting/lout/builder.sh b/pkgs/tools/typesetting/lout/builder.sh index eab37c3c68f..cd513337f6f 100755 --- a/pkgs/tools/typesetting/lout/builder.sh +++ b/pkgs/tools/typesetting/lout/builder.sh @@ -1,6 +1,7 @@ # Prepare a makefile specifying the appropriate output directories. # # Written by Ludovic Courtès . +if [ -e .attrs.sh ]; then source .attrs.sh; fi source "$stdenv/setup" || exit 1 -- cgit 1.4.1