mirror of
https://github.com/NixOS/nix
synced 2025-07-02 17:41: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,9 +0,0 @@
|
|||
programs += nix-build
|
||||
|
||||
nix-build_DIR := $(d)
|
||||
|
||||
nix-build_SOURCES := $(d)/nix-build.cc
|
||||
|
||||
nix-build_LIBS = libmain libexpr libstore libutil libformat
|
||||
|
||||
$(eval $(call install-symlink, nix-build, $(bindir)/nix-shell))
|
|
@ -16,6 +16,7 @@
|
|||
#include "get-drvs.hh"
|
||||
#include "common-eval-args.hh"
|
||||
#include "attr-path.hh"
|
||||
#include "legacy.hh"
|
||||
|
||||
using namespace nix;
|
||||
using namespace std::string_literals;
|
||||
|
@ -66,11 +67,8 @@ std::vector<string> shellwords(const string & s)
|
|||
return res;
|
||||
}
|
||||
|
||||
void mainWrapped(int argc, char * * argv)
|
||||
static void _main(int argc, char * * argv)
|
||||
{
|
||||
initNix();
|
||||
initGC();
|
||||
|
||||
auto dryRun = false;
|
||||
auto runEnv = std::regex_search(argv[0], std::regex("nix-shell$"));
|
||||
auto pure = false;
|
||||
|
@ -504,9 +502,5 @@ void mainWrapped(int argc, char * * argv)
|
|||
}
|
||||
}
|
||||
|
||||
int main(int argc, char * * argv)
|
||||
{
|
||||
return handleExceptions(argv[0], [&]() {
|
||||
return mainWrapped(argc, argv);
|
||||
});
|
||||
}
|
||||
static RegisterLegacyCommand s1("nix-build", _main);
|
||||
static RegisterLegacyCommand s2("nix-shell", _main);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue