diff options
author | Alyssa Ross <hi@alyssa.is> | 2023-09-22 19:21:26 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2023-09-22 19:21:26 +0000 |
commit | ea2acbed493e218f696673a004a95829392c5e33 (patch) | |
tree | c5716552f205bbf4d4addfa4675ea5073786bd06 /nixpkgs/pkgs/build-support | |
parent | 06ba6c84f858b011fb1132721e5d5e28fcda4a8a (diff) | |
parent | 8aa8cd68f4745eb92f003666bfd300f3e67cd9c1 (diff) | |
download | nixlib-ea2acbed493e218f696673a004a95829392c5e33.tar nixlib-ea2acbed493e218f696673a004a95829392c5e33.tar.gz nixlib-ea2acbed493e218f696673a004a95829392c5e33.tar.bz2 nixlib-ea2acbed493e218f696673a004a95829392c5e33.tar.lz nixlib-ea2acbed493e218f696673a004a95829392c5e33.tar.xz nixlib-ea2acbed493e218f696673a004a95829392c5e33.tar.zst nixlib-ea2acbed493e218f696673a004a95829392c5e33.zip |
Merge branch 'staging' of https://github.com/NixOS/nixpkgs
Diffstat (limited to 'nixpkgs/pkgs/build-support')
12 files changed, 58 insertions, 38 deletions
diff --git a/nixpkgs/pkgs/build-support/build-fhsenv-bubblewrap/default.nix b/nixpkgs/pkgs/build-support/build-fhsenv-bubblewrap/default.nix index 6c9b71624c2b..5e8894d7cb33 100644 --- a/nixpkgs/pkgs/build-support/build-fhsenv-bubblewrap/default.nix +++ b/nixpkgs/pkgs/build-support/build-fhsenv-bubblewrap/default.nix @@ -17,12 +17,12 @@ , meta ? {} , passthru ? {} , extraBwrapArgs ? [] -, unshareUser ? true -, unshareIpc ? true -, unsharePid ? true +, unshareUser ? false +, unshareIpc ? false +, unsharePid ? false , unshareNet ? false -, unshareUts ? true -, unshareCgroup ? true +, unshareUts ? false +, unshareCgroup ? false , dieWithParent ? true , ... } @ args: diff --git a/nixpkgs/pkgs/build-support/cc-wrapper/cc-wrapper.sh b/nixpkgs/pkgs/build-support/cc-wrapper/cc-wrapper.sh index 9dcd29c64431..6c43f8cbfa6d 100644 --- a/nixpkgs/pkgs/build-support/cc-wrapper/cc-wrapper.sh +++ b/nixpkgs/pkgs/build-support/cc-wrapper/cc-wrapper.sh @@ -31,7 +31,6 @@ cxxLibrary=1 cInclude=1 expandResponseParams "$@" -linkType=$(checkLinkType "${params[@]}") declare -ag positionalArgs=() declare -i n=0 @@ -175,6 +174,7 @@ extraAfter=(${hardeningCFlagsAfter[@]+"${hardeningCFlagsAfter[@]}"} $NIX_CFLAGS_ extraBefore=(${hardeningCFlagsBefore[@]+"${hardeningCFlagsBefore[@]}"} $NIX_CFLAGS_COMPILE_BEFORE_@suffixSalt@) if [ "$dontLink" != 1 ]; then + linkType=$(checkLinkType $NIX_LDFLAGS_BEFORE_@suffixSalt@ "${params[@]}" ${NIX_CFLAGS_LINK_@suffixSalt@:-} $NIX_LDFLAGS_@suffixSalt@) # Add the flags that should only be passed to the compiler when # linking. diff --git a/nixpkgs/pkgs/build-support/cc-wrapper/default.nix b/nixpkgs/pkgs/build-support/cc-wrapper/default.nix index e1da3ceb5bc9..eef67154ef94 100644 --- a/nixpkgs/pkgs/build-support/cc-wrapper/default.nix +++ b/nixpkgs/pkgs/build-support/cc-wrapper/default.nix @@ -469,6 +469,7 @@ stdenv.mkDerivation { '' + optionalString (libcxx.isLLVM or false) '' echo "-isystem ${lib.getDev libcxx}/include/c++/v1" >> $out/nix-support/libcxx-cxxflags + echo "-isystem ${lib.getDev libcxx.cxxabi}/include/c++/v1" >> $out/nix-support/libcxx-cxxflags echo "-stdlib=libc++" >> $out/nix-support/libcxx-ldflags echo "-l${libcxx.cxxabi.libName}" >> $out/nix-support/libcxx-ldflags '' diff --git a/nixpkgs/pkgs/build-support/deterministic-uname/deterministic-uname.sh b/nixpkgs/pkgs/build-support/deterministic-uname/deterministic-uname.sh index 5272bb5b3fe1..31772aeee3cc 100644 --- a/nixpkgs/pkgs/build-support/deterministic-uname/deterministic-uname.sh +++ b/nixpkgs/pkgs/build-support/deterministic-uname/deterministic-uname.sh @@ -38,6 +38,10 @@ processor=0 hardware_platform=0 operating_system=0 +# With no OPTION, same as -s. +if [[ $# -eq 0 ]]; then + kernel_name=1 +fi @getopt@/bin/getopt --test > /dev/null && rc=$? || rc=$? if [[ $rc -ne 4 ]]; then @@ -54,11 +58,6 @@ else eval set -- "$PARSED" fi -# With no OPTION, same as -s. -if [[ $# -eq 0 ]]; then - kernel_name=1 -fi - # Process each argument, and set the appropriate flag if we recognize it. while [[ $# -ge 1 ]]; do case "$1" in @@ -132,44 +131,44 @@ fi # Darwin *nodename* 22.1.0 Darwin Kernel Version 22.1.0: Sun Oct 9 20:14:30 PDT 2022; root:xnu-8792.41.9~2/RELEASE_ARM64_T8103 arm64 arm Darwin # NixOS: # Linux *nodename* 6.0.13 #1-NixOS SMP PREEMPT_DYNAMIC Wed Dec 14 10:41:06 UTC 2022 x86_64 GNU/Linux +output=() if [[ "$all" = "1" ]]; then - echo -n "$KERNEL_NAME_VAL $NODENAME_VAL $KERNEL_RELEASE_VAL $KERNEL_VERSION_VAL $MACHINE_VAL " + output+=("$KERNEL_NAME_VAL" "$NODENAME_VAL" "$KERNEL_RELEASE_VAL" "$KERNEL_VERSION_VAL" "$MACHINE_VAL") # in help: except omit -p and -i if unknown. - #echo -n "$PROCESSOR_VAL $HARDWARE_PLATFORM_VAL\n" - echo -n "$OPERATING_SYSTEM_VAL" + # output+=($PROCESSOR_VAL $HARDWARE_PLATFORM_VAL) + output+=("$OPERATING_SYSTEM_VAL") fi if [[ "$kernel_name" = "1" ]]; then - echo -n "$KERNEL_NAME_VAL" + output+=("$KERNEL_NAME_VAL") fi if [[ "$nodename" = "1" ]]; then - echo -n "$NODENAME_VAL" + output+=("$NODENAME_VAL") fi if [[ "$kernel_release" = "1" ]]; then - echo -n "$KERNEL_RELEASE_VAL" + output+=("$KERNEL_RELEASE_VAL") fi if [[ "$kernel_version" = "1" ]]; then - echo -n "$KERNEL_VERSION_VAL" + output+=("$KERNEL_VERSION_VAL") fi if [[ "$machine" = "1" ]]; then - echo -n "$MACHINE_VAL" + output+=("$MACHINE_VAL") fi if [[ "$processor" = "1" ]]; then - echo -n "$PROCESSOR_VAL" + output+=("$PROCESSOR_VAL") fi if [[ "$hardware_platform" = "1" ]]; then - echo -n "$HARDWARE_PLATFORM_VAL" + output+=("$HARDWARE_PLATFORM_VAL") fi if [[ "$operating_system" = "1" ]]; then - echo -n "$OPERATING_SYSTEM_VAL" + output+=("$OPERATING_SYSTEM_VAL") fi -# for newline. -echo +echo "${output[@]}" diff --git a/nixpkgs/pkgs/build-support/flutter/default.nix b/nixpkgs/pkgs/build-support/flutter/default.nix index c109804680f3..a0ed1211ed81 100644 --- a/nixpkgs/pkgs/build-support/flutter/default.nix +++ b/nixpkgs/pkgs/build-support/flutter/default.nix @@ -3,8 +3,10 @@ , stdenvNoCC , runCommand , makeWrapper +, wrapGAppsHook , llvmPackages_13 , cacert +, glib , flutter , jq }: @@ -68,8 +70,12 @@ let deps flutter jq + glib + wrapGAppsHook ] ++ nativeBuildInputs; + dontWrapGApps = true; + preUnpack = '' ${lib.optionalString (!autoDepsList) '' if ! { [ '${lib.boolToString (depsListFile != null)}' = 'true' ] ${lib.optionalString (depsListFile != null) "&& cmp -s <(jq -Sc . '${depsListFile}') <(jq -Sc . '${finalAttrs.passthru.depsListFile}')"}; }; then @@ -144,6 +150,7 @@ let for f in "$out"/bin/*; do wrapProgram "$f" \ --suffix LD_LIBRARY_PATH : '${lib.makeLibraryPath finalAttrs.runtimeDependencies}' \ + ''${gappsWrapperArgs[@]} \ ${extraWrapProgramArgs} done diff --git a/nixpkgs/pkgs/build-support/php/hooks/composer-install-hook.sh b/nixpkgs/pkgs/build-support/php/hooks/composer-install-hook.sh index bb6cb47e861b..86d17d0f50f7 100644 --- a/nixpkgs/pkgs/build-support/php/hooks/composer-install-hook.sh +++ b/nixpkgs/pkgs/build-support/php/hooks/composer-install-hook.sh @@ -41,7 +41,7 @@ composerInstallBuildHook() { # Since this file cannot be generated in the composer-repository-hook.sh # because the file contains hardcoded nix store paths, we generate it here. - composer-local-repo-plugin --no-ansi build-local-repo -p "${composerRepository}" > packages.json + composer-local-repo-plugin --no-ansi build-local-repo -m "${composerRepository}" . # Remove all the repositories of type "composer" # from the composer.json file. diff --git a/nixpkgs/pkgs/build-support/php/pkgs/composer-local-repo-plugin.nix b/nixpkgs/pkgs/build-support/php/pkgs/composer-local-repo-plugin.nix index 67edbf1f44f9..f4f1cc1ff72e 100644 --- a/nixpkgs/pkgs/build-support/php/pkgs/composer-local-repo-plugin.nix +++ b/nixpkgs/pkgs/build-support/php/pkgs/composer-local-repo-plugin.nix @@ -27,13 +27,13 @@ let in stdenvNoCC.mkDerivation (finalAttrs: { pname = "composer-local-repo-plugin"; - version = "1.0.0"; + version = "1.0.2"; src = fetchFromGitHub { owner = "nix-community"; repo = "composer-local-repo-plugin"; rev = finalAttrs.version; - hash = "sha256-sjWV4JXK8YJ5XLASMPipKlk9u57352wIDV2PPFIP+sk="; + hash = "sha256-L1DPAINlYiC/HdcgDpI72OI58v8LWfhZVuS1vtNDnEw="; }; COMPOSER_CACHE_DIR = "/dev/null"; diff --git a/nixpkgs/pkgs/build-support/php/pkgs/composer-phar.nix b/nixpkgs/pkgs/build-support/php/pkgs/composer-phar.nix index 41cba03f4f5d..3efd9098d6df 100644 --- a/nixpkgs/pkgs/build-support/php/pkgs/composer-phar.nix +++ b/nixpkgs/pkgs/build-support/php/pkgs/composer-phar.nix @@ -14,11 +14,11 @@ stdenvNoCC.mkDerivation (finalAttrs: { pname = "composer-phar"; - version = "2.6.2"; + version = "2.6.3"; src = fetchurl { url = "https://github.com/composer/composer/releases/download/${finalAttrs.version}/composer.phar"; - hash = "sha256-iMhNSlP88cJ9Z2Lh1da3DVfG3J0uIxT9Cdv4a/YeGu8="; + hash = "sha256-5Yo5DKwN9FzPWj2VrpT6I57e2LeQf6LI91LwIDBPybE="; }; dontUnpack = true; diff --git a/nixpkgs/pkgs/build-support/setup-hooks/make-binary-wrapper/default.nix b/nixpkgs/pkgs/build-support/setup-hooks/make-binary-wrapper/default.nix index 62ba3705be20..f364dd5de753 100644 --- a/nixpkgs/pkgs/build-support/setup-hooks/make-binary-wrapper/default.nix +++ b/nixpkgs/pkgs/build-support/setup-hooks/make-binary-wrapper/default.nix @@ -19,7 +19,7 @@ makeSetupHook { passthru = { # Extract the function call used to create a binary wrapper from its embedded docstring extractCmd = writeShellScript "extract-binary-wrapper-cmd" '' - strings -dw "$1" | sed -n '/^makeCWrapper/,/^$/ p' + ${cc.bintools.targetPrefix}strings -dw "$1" | sed -n '/^makeCWrapper/,/^$/ p' ''; tests = tests.makeBinaryWrapper; diff --git a/nixpkgs/pkgs/build-support/setup-hooks/make-binary-wrapper/make-binary-wrapper.sh b/nixpkgs/pkgs/build-support/setup-hooks/make-binary-wrapper/make-binary-wrapper.sh index 88a50befd732..6cd01f6bf630 100644 --- a/nixpkgs/pkgs/build-support/setup-hooks/make-binary-wrapper/make-binary-wrapper.sh +++ b/nixpkgs/pkgs/build-support/setup-hooks/make-binary-wrapper/make-binary-wrapper.sh @@ -193,8 +193,23 @@ makeCWrapper() { addFlags() { local n flag before after var + + # Disable file globbing, since bash will otherwise try to find + # filenames matching the the value to be prefixed/suffixed if + # it contains characters considered wildcards, such as `?` and + # `*`. We want the value as is, except we also want to split + # it on on the separator; hence we can't quote it. + local reenableGlob=0 + if [[ ! -o noglob ]]; then + reenableGlob=1 + fi + set -o noglob # shellcheck disable=SC2086 before=($1) after=($2) + if (( reenableGlob )); then + set +o noglob + fi + var="argv_tmp" printf '%s\n' "char **$var = calloc(${#before[@]} + argc + ${#after[@]} + 1, sizeof(*$var));" printf '%s\n' "assert($var != NULL);" diff --git a/nixpkgs/pkgs/build-support/testers/testMetaPkgConfig/tester.nix b/nixpkgs/pkgs/build-support/testers/testMetaPkgConfig/tester.nix index bee97ace1409..7892a29e4c28 100644 --- a/nixpkgs/pkgs/build-support/testers/testMetaPkgConfig/tester.nix +++ b/nixpkgs/pkgs/build-support/testers/testMetaPkgConfig/tester.nix @@ -6,9 +6,7 @@ runCommand "check-meta-pkg-config-modules-for-${package.name}" { meta = { description = "Test whether ${package.name} exposes all pkg-config modules ${toString package.meta.pkgConfigModules}"; }; - dependsOn = map - (moduleName: testers.hasPkgConfigModule { inherit package moduleName; }) - package.meta.pkgConfigModules; + dependsOn = testers.hasPkgConfigModules { inherit package; }; } '' echo "found all of ${toString package.meta.pkgConfigModules}" > "$out" '' diff --git a/nixpkgs/pkgs/build-support/trivial-builders/default.nix b/nixpkgs/pkgs/build-support/trivial-builders/default.nix index c4f2cfd754cd..8b8732af0656 100644 --- a/nixpkgs/pkgs/build-support/trivial-builders/default.nix +++ b/nixpkgs/pkgs/build-support/trivial-builders/default.nix @@ -379,21 +379,21 @@ rec { }; # Create a C binary - writeCBin = name: code: - runCommandCC name + writeCBin = pname: code: + runCommandCC pname { - inherit name code; + inherit pname code; executable = true; passAsFile = ["code"]; # Pointless to do this on a remote machine. preferLocalBuild = true; allowSubstitutes = false; meta = { - mainProgram = name; + mainProgram = pname; }; } '' - n=$out/bin/$name + n=$out/bin/${pname} mkdir -p "$(dirname "$n")" mv "$codePath" code.c $CC -x c code.c -o "$n" |