Merge staging into staging-next

This commit is contained in:
Frederik Rietdijk 2020-09-07 20:26:57 +02:00
commit a834677062
10 changed files with 14 additions and 108 deletions

View File

@ -311,7 +311,7 @@ stdenv.mkDerivation {
substituteAll ${./add-flags.sh} $out/nix-support/add-flags.sh substituteAll ${./add-flags.sh} $out/nix-support/add-flags.sh
substituteAll ${./add-hardening.sh} $out/nix-support/add-hardening.sh substituteAll ${./add-hardening.sh} $out/nix-support/add-hardening.sh
substituteAll ${if stdenv.isDarwin then ../wrapper-common/utils.bash.darwin else ../wrapper-common/utils.bash} $out/nix-support/utils.bash substituteAll ${../wrapper-common/utils.bash} $out/nix-support/utils.bash
'' ''
## ##

View File

@ -453,7 +453,7 @@ stdenv.mkDerivation {
substituteAll ${./add-flags.sh} $out/nix-support/add-flags.sh substituteAll ${./add-flags.sh} $out/nix-support/add-flags.sh
substituteAll ${./add-hardening.sh} $out/nix-support/add-hardening.sh substituteAll ${./add-hardening.sh} $out/nix-support/add-hardening.sh
substituteAll ${if stdenv.isDarwin then ../wrapper-common/utils.bash.darwin else ../wrapper-common/utils.bash} $out/nix-support/utils.bash substituteAll ${../wrapper-common/utils.bash} $out/nix-support/utils.bash
'' ''
## ##

View File

@ -107,7 +107,7 @@ stdenv.mkDerivation {
+ '' + ''
substituteAll ${./add-flags.sh} $out/nix-support/add-flags.sh substituteAll ${./add-flags.sh} $out/nix-support/add-flags.sh
substituteAll ${if stdenv.isDarwin then ../wrapper-common/utils.bash.darwin else ../wrapper-common/utils.bash} $out/nix-support/utils.bash substituteAll ${../wrapper-common/utils.bash} $out/nix-support/utils.bash
'' ''
## ##

View File

@ -155,7 +155,7 @@ stdenv.mkDerivation (args // {
echo echo
echo "To fix the issue:" echo "To fix the issue:"
echo '1. Use "0000000000000000000000000000000000000000000000000000" as the cargoSha256 value' echo '1. Use "0000000000000000000000000000000000000000000000000000" as the cargoSha256 value'
echo "2. Build the derivation and wait it to fail with a hash mismatch" echo "2. Build the derivation and wait for it to fail with a hash mismatch"
echo "3. Copy the 'got: sha256:' value back into the cargoSha256 field" echo "3. Copy the 'got: sha256:' value back into the cargoSha256 field"
echo echo

View File

@ -69,9 +69,9 @@ badPath() {
# directory (including the build directory). # directory (including the build directory).
test \ test \
"$p" != "/dev/null" -a \ "$p" != "/dev/null" -a \
"${p#${NIX_STORE}}" = "$p" -a \ "${p:0:${#NIX_STORE}}" != "$NIX_STORE" -a \
"${p#${TMP:-/tmp}}" = "$p" -a \ "${p:0:4}" != "/tmp" -a \
"${p#${NIX_BUILD_TOP}}" = "$p" "${p:0:${#NIX_BUILD_TOP}}" != "$NIX_BUILD_TOP"
} }
expandResponseParams() { expandResponseParams() {

View File

@ -1,92 +0,0 @@
# Accumulate suffixes for taking in the right input parameters with the `mangle*`
# functions below. See setup-hook for details.
accumulateRoles() {
declare -ga role_suffixes=()
if [ "${NIX_@wrapperName@_TARGET_BUILD_@suffixSalt@:-}" ]; then
role_suffixes+=('_FOR_BUILD')
fi
if [ "${NIX_@wrapperName@_TARGET_HOST_@suffixSalt@:-}" ]; then
role_suffixes+=('')
fi
if [ "${NIX_@wrapperName@_TARGET_TARGET_@suffixSalt@:-}" ]; then
role_suffixes+=('_FOR_TARGET')
fi
}
mangleVarList() {
local var="$1"
shift
local -a role_suffixes=("$@")
local outputVar="${var}_@suffixSalt@"
declare -gx ${outputVar}+=''
# For each role we serve, we accumulate the input parameters into our own
# cc-wrapper-derivation-specific environment variables.
for suffix in "${role_suffixes[@]}"; do
local inputVar="${var}${suffix}"
if [ -v "$inputVar" ]; then
export ${outputVar}+="${!outputVar:+ }${!inputVar}"
fi
done
}
mangleVarBool() {
local var="$1"
shift
local -a role_suffixes=("$@")
local outputVar="${var}_@suffixSalt@"
declare -gxi ${outputVar}+=0
for suffix in "${role_suffixes[@]}"; do
local inputVar="${var}${suffix}"
if [ -v "$inputVar" ]; then
# "1" in the end makes `let` return success error code when
# expression itself evaluates to zero.
# We don't use `|| true` because that would silence actual
# syntax errors from bad variable values.
let "${outputVar} |= ${!inputVar:-0}" "1"
fi
done
}
skip () {
if (( "${NIX_DEBUG:-0}" >= 1 )); then
echo "skipping impure path $1" >&2
fi
}
# Checks whether a path is impure. E.g., `/lib/foo.so' is impure, but
# `/nix/store/.../lib/foo.so' isn't.
badPath() {
local p=$1
# Relative paths are okay (since they're presumably relative to
# the temporary build directory).
if [ "${p:0:1}" != / ]; then return 1; fi
# Otherwise, the path should refer to the store or some temporary
# directory (including the build directory).
test \
"$p" != "/dev/null" -a \
"${p:0:${#NIX_STORE}}" != "$NIX_STORE" -a \
"${p:0:4}" != "/tmp" -a \
"${p:0:${#NIX_BUILD_TOP}}" != "$NIX_BUILD_TOP"
}
expandResponseParams() {
declare -ga params=("$@")
local arg
for arg in "$@"; do
if [[ "$arg" == @* ]]; then
# phase separation makes this look useless
# shellcheck disable=SC2157
if [ -x "@expandResponseParams@" ]; then
# params is used by caller
#shellcheck disable=SC2034
readarray -d '' params < <("@expandResponseParams@" "$@")
return 0
fi
fi
done
}

View File

@ -1,14 +1,14 @@
{ stdenv, fetchFromGitHub, autoreconfHook, pkgconfig }: { stdenv, fetchFromGitHub, autoreconfHook, pkgconfig }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
version = "1.0.5"; version = "1.0.6";
pname = "libde265"; pname = "libde265";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "strukturag"; owner = "strukturag";
repo = "libde265"; repo = "libde265";
rev = "v${version}"; rev = "v${version}";
sha256 = "1qisj8ryzbknam3hk81rq70fsd9mcpxm898bqygvbsmbwyvmz3pg"; sha256 = "0ipccyavlgf7hfzx1g8bvzg62xq10vcxvwgq70r3z3j6mdvmrzjp";
}; };
nativeBuildInputs = [ autoreconfHook pkgconfig ]; nativeBuildInputs = [ autoreconfHook pkgconfig ];

View File

@ -2,7 +2,7 @@
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "libheif"; pname = "libheif";
version = "1.7.0"; version = "1.8.0";
outputs = [ "bin" "out" "dev" "man" ]; outputs = [ "bin" "out" "dev" "man" ];
@ -10,7 +10,7 @@ stdenv.mkDerivation rec {
owner = "strukturag"; owner = "strukturag";
repo = "libheif"; repo = "libheif";
rev = "v${version}"; rev = "v${version}";
sha256 = "0alri5h486ck9b5z6wwrmlpzydhz58l223z3zxkizqrzxlllhr6p"; sha256 = "15az44qdqp2vncdfv1bzdl30977kvqxcb2bhx4x3q6vcxnm1xfgg";
}; };
nativeBuildInputs = [ autoreconfHook pkgconfig ]; nativeBuildInputs = [ autoreconfHook pkgconfig ];

View File

@ -2,7 +2,7 @@
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "libwacom"; pname = "libwacom";
version = "1.4.1"; version = "1.5";
outputs = [ "out" "dev" ]; outputs = [ "out" "dev" ];
@ -10,7 +10,7 @@ stdenv.mkDerivation rec {
owner = "linuxwacom"; owner = "linuxwacom";
repo = "libwacom"; repo = "libwacom";
rev = "libwacom-${version}"; rev = "libwacom-${version}";
sha256 = "0m96zjj832l18rzg9l31ambm6rv9vnh2a1sfk8531da8m347z287"; sha256 = "1a3qkzpkag1vqd2xl7b7f2b8kbg1y1g6gg5ydzb1ppyqw3zdjf9x";
}; };
nativeBuildInputs = [ pkgconfig meson ninja doxygen ]; nativeBuildInputs = [ pkgconfig meson ninja doxygen ];

View File

@ -1,6 +1,5 @@
{ buildPackages, runCommand, nettools, bc, bison, flex, perl, rsync, gmp, libmpc, mpfr, openssl { buildPackages, runCommand, nettools, bc, bison, flex, perl, rsync, gmp, libmpc, mpfr, openssl
, libelf, cpio, elfutils , libelf, cpio, elfutils
, utillinuxMinimal
, writeTextFile , writeTextFile
}: }:
@ -281,7 +280,6 @@ let
in in
assert (stdenv.lib.versionAtLeast version "4.14" && stdenv.lib.versionOlder version "5.8") -> libelf != null; assert (stdenv.lib.versionAtLeast version "4.14" && stdenv.lib.versionOlder version "5.8") -> libelf != null;
assert stdenv.lib.versionAtLeast version "4.15" -> utillinuxMinimal != null;
assert stdenv.lib.versionAtLeast version "5.8" -> elfutils != null; assert stdenv.lib.versionAtLeast version "5.8" -> elfutils != null;
stdenv.mkDerivation ((drvAttrs config stdenv.hostPlatform.platform kernelPatches configfile) // { stdenv.mkDerivation ((drvAttrs config stdenv.hostPlatform.platform kernelPatches configfile) // {
@ -294,7 +292,7 @@ stdenv.mkDerivation ((drvAttrs config stdenv.hostPlatform.platform kernelPatches
nativeBuildInputs = [ perl bc nettools openssl rsync gmp libmpc mpfr ] nativeBuildInputs = [ perl bc nettools openssl rsync gmp libmpc mpfr ]
++ optional (stdenv.hostPlatform.platform.kernelTarget == "uImage") buildPackages.ubootTools ++ optional (stdenv.hostPlatform.platform.kernelTarget == "uImage") buildPackages.ubootTools
++ optional (stdenv.lib.versionAtLeast version "4.14" && stdenv.lib.versionOlder version "5.8") libelf ++ optional (stdenv.lib.versionAtLeast version "4.14" && stdenv.lib.versionOlder version "5.8") libelf
++ optional (stdenv.lib.versionAtLeast version "4.15") utillinuxMinimal # Removed utillinuxMinimal since it should not be a dependency.
++ optionals (stdenv.lib.versionAtLeast version "4.16") [ bison flex ] ++ optionals (stdenv.lib.versionAtLeast version "4.16") [ bison flex ]
++ optional (stdenv.lib.versionAtLeast version "5.2") cpio ++ optional (stdenv.lib.versionAtLeast version "5.2") cpio
++ optional (stdenv.lib.versionAtLeast version "5.8") elfutils ++ optional (stdenv.lib.versionAtLeast version "5.8") elfutils