mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-27 01:13:05 +00:00
Merge pull request #209255 from Artturin/stdenvupdate1
stdenv: don't fail installPhase on missing makefile
This commit is contained in:
commit
386f2bb148
@ -6,8 +6,8 @@ postFixupHooks+=(_makeSymlinksRelative)
|
|||||||
_makeSymlinksRelative() {
|
_makeSymlinksRelative() {
|
||||||
local symlinkTarget
|
local symlinkTarget
|
||||||
|
|
||||||
if [ -n "${dontRewriteSymlinks-}" ]; then
|
if [ "${dontRewriteSymlinks-}" ] || [ ! -e "$prefix" ]; then
|
||||||
return 0
|
return
|
||||||
fi
|
fi
|
||||||
|
|
||||||
while IFS= read -r -d $'\0' f; do
|
while IFS= read -r -d $'\0' f; do
|
||||||
|
@ -36,7 +36,7 @@ _doStrip() {
|
|||||||
local -n ranlibCmd="${ranlibCmds[$i]}"
|
local -n ranlibCmd="${ranlibCmds[$i]}"
|
||||||
|
|
||||||
# `dontStrip` disables them all
|
# `dontStrip` disables them all
|
||||||
if [[ "${dontStrip-}" || "${flag-}" ]] || ! type -f "${stripCmd-}" 2>/dev/null
|
if [[ "${dontStrip-}" || "${flag-}" ]] || ! type -f "${stripCmd-}" 2>/dev/null 1>&2
|
||||||
then continue; fi
|
then continue; fi
|
||||||
|
|
||||||
stripDirs "$stripCmd" "$ranlibCmd" "$debugDirList" "${stripDebugFlags[*]:--S}"
|
stripDirs "$stripCmd" "$ranlibCmd" "$debugDirList" "${stripDebugFlags[*]:--S}"
|
||||||
|
@ -1253,7 +1253,7 @@ buildPhase() {
|
|||||||
runHook preBuild
|
runHook preBuild
|
||||||
|
|
||||||
if [[ -z "${makeFlags-}" && -z "${makefile:-}" && ! ( -e Makefile || -e makefile || -e GNUmakefile ) ]]; then
|
if [[ -z "${makeFlags-}" && -z "${makefile:-}" && ! ( -e Makefile || -e makefile || -e GNUmakefile ) ]]; then
|
||||||
echo "no Makefile, doing nothing"
|
echo "no Makefile or custom buildPhase, doing nothing"
|
||||||
else
|
else
|
||||||
foundMakefile=1
|
foundMakefile=1
|
||||||
|
|
||||||
@ -1323,6 +1323,15 @@ checkPhase() {
|
|||||||
installPhase() {
|
installPhase() {
|
||||||
runHook preInstall
|
runHook preInstall
|
||||||
|
|
||||||
|
# Dont reuse 'foundMakefile' set in buildPhase, a makefile may have been created in buildPhase
|
||||||
|
if [[ -z "${makeFlags-}" && -z "${makefile:-}" && ! ( -e Makefile || -e makefile || -e GNUmakefile ) ]]; then
|
||||||
|
echo "no Makefile or custom installPhase, doing nothing"
|
||||||
|
runHook postInstall
|
||||||
|
return
|
||||||
|
else
|
||||||
|
foundMakefile=1
|
||||||
|
fi
|
||||||
|
|
||||||
if [ -n "$prefix" ]; then
|
if [ -n "$prefix" ]; then
|
||||||
mkdir -p "$prefix"
|
mkdir -p "$prefix"
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user