mirror of
https://github.com/NixOS/nix
synced 2025-07-06 05:01:48 +02:00
Merge all nix-* binaries into nix
These are all symlinks to 'nix' now, reducing the installed size by about ~1.7 MiB.
This commit is contained in:
parent
c47e14ee45
commit
f6a3dfe4e0
24 changed files with 105 additions and 165 deletions
|
@ -1,13 +0,0 @@
|
|||
programs += nix-daemon
|
||||
|
||||
nix-daemon_DIR := $(d)
|
||||
|
||||
nix-daemon_SOURCES := $(d)/nix-daemon.cc
|
||||
|
||||
nix-daemon_LIBS = libmain libstore libutil libformat
|
||||
|
||||
nix-daemon_LDFLAGS = -pthread
|
||||
|
||||
ifeq ($(OS), SunOS)
|
||||
nix-daemon_LDFLAGS += -lsocket
|
||||
endif
|
|
@ -9,6 +9,7 @@
|
|||
#include "monitor-fd.hh"
|
||||
#include "derivations.hh"
|
||||
#include "finally.hh"
|
||||
#include "legacy.hh"
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
|
@ -1058,11 +1059,9 @@ static void daemonLoop(char * * argv)
|
|||
}
|
||||
|
||||
|
||||
int main(int argc, char * * argv)
|
||||
static int _main(int argc, char * * argv)
|
||||
{
|
||||
return handleExceptions(argv[0], [&]() {
|
||||
initNix();
|
||||
|
||||
{
|
||||
auto stdio = false;
|
||||
|
||||
parseCmdLine(argc, argv, [&](Strings::iterator & arg, const Strings::iterator & end) {
|
||||
|
@ -1122,7 +1121,7 @@ int main(int argc, char * * argv)
|
|||
if (res == -1)
|
||||
throw SysError("splicing data from stdin to daemon socket");
|
||||
else if (res == 0)
|
||||
return;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
@ -1131,5 +1130,9 @@ int main(int argc, char * * argv)
|
|||
} else {
|
||||
daemonLoop(argv);
|
||||
}
|
||||
});
|
||||
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
static RegisterLegacyCommand s1("nix-daemon", _main);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue