mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-15 02:36:16 +02:00
More comment rewording as requested
Co-Authored-By: Robert Hensing <robert@roberthensing.nl>
This commit is contained in:
parent
f7db612e8b
commit
0db8ff820b
3 changed files with 9 additions and 7 deletions
|
@ -13,11 +13,12 @@ fs::path getNixBin(std::optional<std::string_view> binaryNameOpt)
|
||||||
{
|
{
|
||||||
auto getBinaryName = [&] { return binaryNameOpt ? *binaryNameOpt : "nix"; };
|
auto getBinaryName = [&] { return binaryNameOpt ? *binaryNameOpt : "nix"; };
|
||||||
|
|
||||||
// If the environment variable is set, use it unconditionally
|
// If the environment variable is set, use it unconditionally.
|
||||||
if (auto envOpt = getEnvNonEmpty("NIX_BIN_DIR"))
|
if (auto envOpt = getEnvNonEmpty("NIX_BIN_DIR"))
|
||||||
return fs::path{*envOpt} / std::string{getBinaryName()};
|
return fs::path{*envOpt} / std::string{getBinaryName()};
|
||||||
|
|
||||||
// Use some-times avaiable OS tricks to get to the path of this Nix, and try that
|
// Try OS tricks, if available, to get to the path of this Nix, and
|
||||||
|
// see if we can find the right executable next to that.
|
||||||
if (auto selfOpt = getSelfExe()) {
|
if (auto selfOpt = getSelfExe()) {
|
||||||
fs::path path{*selfOpt};
|
fs::path path{*selfOpt};
|
||||||
if (binaryNameOpt)
|
if (binaryNameOpt)
|
||||||
|
|
|
@ -17,9 +17,9 @@ namespace nix {
|
||||||
* Instead, we'll query the OS for the path to the current executable,
|
* Instead, we'll query the OS for the path to the current executable,
|
||||||
* using `getSelfExe()`.
|
* using `getSelfExe()`.
|
||||||
*
|
*
|
||||||
* As a last resort, we resort to `PATH`. Hopefully we find a `nix`
|
* As a last resort, we rely on `PATH`. Hopefully we find a `nix` there
|
||||||
* there that's compatible. If you're porting Nix to a new platform,
|
* that's compatible. If you're porting Nix to a new platform, that
|
||||||
* that might be good enough for a while, but you'll want to improve
|
* might be good enough for a while, but you'll want to improve
|
||||||
* `getSelfExe()` to work on your platform.
|
* `getSelfExe()` to work on your platform.
|
||||||
*
|
*
|
||||||
* @param binary_name the exact binary name we're looking up. Might be
|
* @param binary_name the exact binary name we're looking up. Might be
|
||||||
|
|
|
@ -253,8 +253,9 @@ foreach suite : suites
|
||||||
'NIX_REMOTE': '',
|
'NIX_REMOTE': '',
|
||||||
'PS4': '+(${BASH_SOURCE[0]-$0}:$LINENO) ',
|
'PS4': '+(${BASH_SOURCE[0]-$0}:$LINENO) ',
|
||||||
},
|
},
|
||||||
# some tests take 15+ seconds even on an otherwise idle machine, on a loaded machine
|
# Some tests take 15+ seconds even on an otherwise idle machine;
|
||||||
# this can easily drive them to failure. give them more time than default of 30sec
|
# on a loaded machine this can easily drive them to failure. Give
|
||||||
|
# them more time than the default of 30 seconds.
|
||||||
timeout : 300,
|
timeout : 300,
|
||||||
# Used for target dependency/ordering tracking, not adding compiler flags or anything.
|
# Used for target dependency/ordering tracking, not adding compiler flags or anything.
|
||||||
depends : suite['deps'],
|
depends : suite['deps'],
|
||||||
|
|
Loading…
Reference in a new issue