mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-04-13 21:17:37 +00:00
treewide: handle prePhases __structuredAttrs-agnostically
Always specify the prePhases attribute as a list instead of a string. Append elements to the prePhases Bash variable using appendToVar instead of string or Bash array concatenation.
This commit is contained in:
parent
e2fffc8362
commit
21c0129841
@ -17,7 +17,7 @@ let
|
||||
pluginDerivation = attrs: let
|
||||
name = attrs.name or "${attrs.pname}-${attrs.version}";
|
||||
in stdenv.mkDerivation ({
|
||||
prePhases = "extraLib";
|
||||
prePhases = [ "extraLib" ];
|
||||
extraLib = ''
|
||||
installScripts(){
|
||||
mkdir -p $out/${gimp.targetScriptDir}/${name};
|
||||
@ -54,7 +54,7 @@ let
|
||||
});
|
||||
|
||||
scriptDerivation = {src, ...}@attrs : pluginDerivation ({
|
||||
prePhases = "extraLib";
|
||||
prePhases = [ "extraLib" ];
|
||||
dontUnpack = true;
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
@ -18,7 +18,7 @@ vmTools.runInLinuxImage (stdenv.mkDerivation (
|
||||
|
||||
prefix = "/usr";
|
||||
|
||||
prePhases = "installExtraDebsPhase sysInfoPhase";
|
||||
prePhases = [ "installExtraDebsPhase" "sysInfoPhase" ];
|
||||
}
|
||||
|
||||
// removeAttrs args ["vmTools" "lib"] //
|
||||
|
@ -1,4 +1,4 @@
|
||||
prePhases+=" moveBuildDir"
|
||||
appendToVar prePhases moveBuildDir
|
||||
|
||||
moveBuildDir() {
|
||||
mkdir -p $out/.build
|
||||
|
@ -1,4 +1,4 @@
|
||||
prePhases+=" moveBuildDir"
|
||||
appendToVar prePhases moveBuildDir
|
||||
|
||||
moveBuildDir() {
|
||||
mkdir -p $out/.build
|
||||
|
@ -18,7 +18,7 @@ echoCmd "HAREPATH" "$HAREPATH"
|
||||
echoCmd "hare" "$(command -v hare)"
|
||||
echoCmd "hare-native" "$(command -v hare-native)"
|
||||
'
|
||||
prePhases+=("hareSetStdlibPhase" "hareInfoPhase")
|
||||
appendToVar prePhases hareSetStdlibPhase hareInfoPhase
|
||||
|
||||
readonly hare_unconditional_flags="@hare_unconditional_flags@"
|
||||
case "${hareBuildType:-"release"}" in
|
||||
|
@ -73,6 +73,6 @@ configureNuget() {
|
||||
}
|
||||
|
||||
if [[ -z ${dontConfigureNuget-} ]]; then
|
||||
prePhases+=(createNugetDirs)
|
||||
appendToVar prePhases createNugetDirs
|
||||
preConfigurePhases+=(configureNuget)
|
||||
fi
|
||||
|
@ -20,7 +20,7 @@ qmakePrePhase() {
|
||||
# do the stripping ourselves (needed for separateDebugInfo)
|
||||
prependToVar qmakeFlags "CONFIG+=nostrip"
|
||||
}
|
||||
prePhases+=" qmakePrePhase"
|
||||
appendToVar prePhases qmakePrePhase
|
||||
|
||||
qmakeConfigurePhase() {
|
||||
runHook preConfigure
|
||||
|
@ -107,6 +107,6 @@ qtPreHook() {
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
prePhases+=" qtPreHook"
|
||||
appendToVar prePhases qtPreHook
|
||||
|
||||
fi
|
||||
|
@ -13,7 +13,7 @@ qmakePrePhase() {
|
||||
"NIX_OUTPUT_QML=${!outputBin}/${qtQmlPrefix:?}" \
|
||||
"NIX_OUTPUT_PLUGIN=${!outputBin}/${qtPluginPrefix:?}"
|
||||
}
|
||||
prePhases+=" qmakePrePhase"
|
||||
appendToVar prePhases qmakePrePhase
|
||||
|
||||
qmakeConfigurePhase() {
|
||||
runHook preConfigure
|
||||
|
@ -81,7 +81,7 @@ else # Only set up Qt once.
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
prePhases+=" qtPreHook"
|
||||
appendToVar prePhases qtPreHook
|
||||
|
||||
addQtModulePrefix() {
|
||||
addToSearchPath QT_ADDITIONAL_PACKAGES_PREFIX_PATH $1
|
||||
|
Loading…
Reference in New Issue
Block a user