mirror of
https://github.com/NixOS/nix
synced 2025-07-06 21: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,7 +0,0 @@
|
|||
programs += nix-instantiate
|
||||
|
||||
nix-instantiate_DIR := $(d)
|
||||
|
||||
nix-instantiate_SOURCES := $(d)/nix-instantiate.cc
|
||||
|
||||
nix-instantiate_LIBS = libexpr libmain libstore libutil libformat
|
|
@ -9,6 +9,7 @@
|
|||
#include "util.hh"
|
||||
#include "store-api.hh"
|
||||
#include "common-eval-args.hh"
|
||||
#include "legacy.hh"
|
||||
|
||||
#include <map>
|
||||
#include <iostream>
|
||||
|
@ -83,12 +84,9 @@ void processExpr(EvalState & state, const Strings & attrPaths,
|
|||
}
|
||||
|
||||
|
||||
int main(int argc, char * * argv)
|
||||
static int _main(int argc, char * * argv)
|
||||
{
|
||||
return handleExceptions(argv[0], [&]() {
|
||||
initNix();
|
||||
initGC();
|
||||
|
||||
{
|
||||
Strings files;
|
||||
bool readStdin = false;
|
||||
bool fromArgs = false;
|
||||
|
@ -171,7 +169,7 @@ int main(int argc, char * * argv)
|
|||
if (p == "") throw Error(format("unable to find '%1%'") % i);
|
||||
std::cout << p << std::endl;
|
||||
}
|
||||
return;
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (readStdin) {
|
||||
|
@ -190,5 +188,9 @@ int main(int argc, char * * argv)
|
|||
}
|
||||
|
||||
state->printStats();
|
||||
});
|
||||
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
static RegisterLegacyCommand s1("nix-instantiate", _main);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue