stdenv: fix prefixKey for structuredAttrs (#470397)
This commit is contained in:
@@ -84,6 +84,8 @@ stdenv.mkDerivation rec {
|
||||
|
||||
installTargets = lib.singleton "install" ++ lib.optional stdenv.hostPlatform.is64bit "install64";
|
||||
|
||||
__structuredAttrs = true;
|
||||
|
||||
meta = {
|
||||
description = "ERESI Reverse Engineering Software Interface";
|
||||
license = lib.licenses.gpl2Only;
|
||||
|
||||
@@ -1455,7 +1455,16 @@ configurePhase() {
|
||||
fi
|
||||
|
||||
if [[ -z "${dontAddPrefix:-}" && -n "$prefix" ]]; then
|
||||
prependToVar configureFlags "${prefixKey:---prefix=}$prefix"
|
||||
# For __structuredAttrs: if prefixKey ends in a space,
|
||||
# we need to add the prefixKey and the prefix as separate entries,
|
||||
# and since we prepend, we do it in reverse order.
|
||||
local -r prefixKeyOrDefault="${prefixKey:---prefix=}"
|
||||
if [ "${prefixKeyOrDefault: -1}" = " " ]; then
|
||||
prependToVar configureFlags "$prefix"
|
||||
prependToVar configureFlags "${prefixKeyOrDefault::-1}"
|
||||
else
|
||||
prependToVar configureFlags "$prefixKeyOrDefault$prefix"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ -f "$configureScript" ]]; then
|
||||
|
||||
Reference in New Issue
Block a user