mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-02 15:41:48 +00:00
Merge pull request #28237 from avnik/qt5-mktemp
qt5: use `mktemp -d` to create fake Qt prefix in nix-shell
This commit is contained in:
commit
5eb2c7a753
@ -116,7 +116,11 @@ fi
|
||||
|
||||
if [ -z "$NIX_QT5_TMP" ]; then
|
||||
if [ -z "$NIX_QT_SUBMODULE" ]; then
|
||||
NIX_QT5_TMP=$(pwd)/__nix_qt5__
|
||||
if [ -z "$IN_NIX_SHELL" ]; then
|
||||
NIX_QT5_TMP=$(pwd)/__nix_qt5__
|
||||
else
|
||||
NIX_QT5_TMP=$(mktemp -d)
|
||||
fi
|
||||
else
|
||||
NIX_QT5_TMP=$out
|
||||
fi
|
||||
@ -142,3 +146,10 @@ EOF
|
||||
export QMAKE="$NIX_QT5_TMP/bin/qmake"
|
||||
fi
|
||||
|
||||
_qtShellCleanupHook () {
|
||||
rm -fr $NIX_QT5_TMP
|
||||
}
|
||||
|
||||
if [ -n "$IN_NIX_SHELL" ]; then
|
||||
trap _qtShellCleanupHook EXIT
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user