diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2018-10-26T09·35+0200 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2018-10-26T10·54+0200 |
commit | f6a3dfe4e06980b2d060fd1a646cb5ca20f29779 (patch) | |
tree | 2b40b00a7283617f18e663e8cb10fda08a38fb93 /src/build-remote | |
parent | c47e14ee453f3054d4a7326d8efe9255458bd7fd (diff) |
Merge all nix-* binaries into nix
These are all symlinks to 'nix' now, reducing the installed size by about ~1.7 MiB.
Diffstat (limited to 'src/build-remote')
-rw-r--r-- | src/build-remote/build-remote.cc | 19 | ||||
-rw-r--r-- | src/build-remote/local.mk | 9 |
2 files changed, 10 insertions, 18 deletions
diff --git a/src/build-remote/build-remote.cc b/src/build-remote/build-remote.cc index 38dbe3e58b26..abf3669b5b35 100644 --- a/src/build-remote/build-remote.cc +++ b/src/build-remote/build-remote.cc @@ -17,6 +17,7 @@ #include "store-api.hh" #include "derivations.hh" #include "local-store.hh" +#include "legacy.hh" using namespace nix; using std::cin; @@ -37,11 +38,9 @@ static AutoCloseFD openSlotLock(const Machine & m, unsigned long long slot) return openLockFile(fmt("%s/%s-%d", currentLoad, escapeUri(m.storeUri), slot), true); } -int main (int argc, char * * argv) +static int _main(int argc, char * * argv) { - return handleExceptions(argv[0], [&]() { - initNix(); - + { logger = makeJSONLogger(*logger); /* Ensure we don't get any SSH passphrase or host key popups. */ @@ -80,7 +79,7 @@ int main (int argc, char * * argv) if (machines.empty()) { std::cerr << "# decline-permanently\n"; - return; + return 0; } string drvPath; @@ -90,8 +89,8 @@ int main (int argc, char * * argv) try { auto s = readString(source); - if (s != "try") return; - } catch (EndOfFile &) { return; } + if (s != "try") return 0; + } catch (EndOfFile &) { return 0; } auto amWilling = readInt(source); auto neededSystem = readString(source); @@ -253,6 +252,8 @@ connected: copyPaths(ref<Store>(sshStore), store, missing, NoRepair, NoCheckSigs, NoSubstitute); } - return; - }); + return 0; + } } + +static RegisterLegacyCommand s1("build-remote", _main); diff --git a/src/build-remote/local.mk b/src/build-remote/local.mk deleted file mode 100644 index 50b0409d1886..000000000000 --- a/src/build-remote/local.mk +++ /dev/null @@ -1,9 +0,0 @@ -programs += build-remote - -build-remote_DIR := $(d) - -build-remote_INSTALL_DIR := $(libexecdir)/nix - -build-remote_LIBS = libmain libformat libstore libutil - -build-remote_SOURCES := $(d)/build-remote.cc |