1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-20 17:29:36 +01: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:
Eelco Dolstra 2018-10-26 11:35:46 +02:00
parent c47e14ee45
commit f6a3dfe4e0
No known key found for this signature in database
GPG key ID: 8170B4726D7198DE
24 changed files with 105 additions and 165 deletions

View file

@ -2,10 +2,25 @@ programs += nix
nix_DIR := $(d)
nix_SOURCES := $(wildcard $(d)/*.cc) $(wildcard src/linenoise/*.cpp)
nix_SOURCES := \
$(wildcard $(d)/*.cc) \
$(wildcard src/linenoise/*.cpp) \
$(wildcard src/build-remote/*.cc) \
$(wildcard src/nix-build/*.cc) \
$(wildcard src/nix-channel/*.cc) \
$(wildcard src/nix-collect-garbage/*.cc) \
$(wildcard src/nix-copy-closure/*.cc) \
$(wildcard src/nix-daemon/*.cc) \
$(wildcard src/nix-env/*.cc) \
$(wildcard src/nix-instantiate/*.cc) \
$(wildcard src/nix-prefetch-url/*.cc) \
$(wildcard src/nix-store/*.cc) \
nix_LIBS = libexpr libmain libstore libutil libformat
nix_LDFLAGS = -pthread
nix_LDFLAGS = -pthread $(SODIUM_LIBS)
$(eval $(call install-symlink, nix, $(bindir)/nix-hash))
$(foreach name, \
nix-build nix-channel nix-collect-garbage nix-copy-closure nix-daemon nix-env nix-hash nix-instantiate nix-prefetch-rul nix-shell nix-shore, \
$(eval $(call install-symlink, nix, $(bindir)/$(name))))
$(eval $(call install-symlink, $(bindir)/nix, $(libexecdir)/nix/build-remote))

View file

@ -67,9 +67,6 @@ struct NixArgs : virtual MultiCommand, virtual MixCommonArgs
void mainWrapped(int argc, char * * argv)
{
verbosity = lvlError;
settings.verboseBuild = false;
/* The chroot helper needs to be run before any threads have been
started. */
if (argc > 0 && argv[0] == chrootHelperName) {
@ -88,6 +85,9 @@ void mainWrapped(int argc, char * * argv)
if (legacy) return legacy(argc, argv);
}
verbosity = lvlError;
settings.verboseBuild = false;
NixArgs args;
args.parseCmdline(argvToStrings(argc, argv));