diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2018-10-26 11:35:46 +0200 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2018-10-26 12:54:00 +0200 |
commit | f6a3dfe4e06980b2d060fd1a646cb5ca20f29779 (patch) | |
tree | 2b40b00a7283617f18e663e8cb10fda08a38fb93 /src/nix-copy-closure | |
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/nix-copy-closure')
-rw-r--r-- | src/nix-copy-closure/local.mk | 7 | ||||
-rwxr-xr-x | src/nix-copy-closure/nix-copy-closure.cc | 13 |
2 files changed, 8 insertions, 12 deletions
diff --git a/src/nix-copy-closure/local.mk b/src/nix-copy-closure/local.mk deleted file mode 100644 index 5018ab975..000000000 --- a/src/nix-copy-closure/local.mk +++ /dev/null @@ -1,7 +0,0 @@ -programs += nix-copy-closure - -nix-copy-closure_DIR := $(d) - -nix-copy-closure_LIBS = libmain libformat libstore libutil - -nix-copy-closure_SOURCES := $(d)/nix-copy-closure.cc diff --git a/src/nix-copy-closure/nix-copy-closure.cc b/src/nix-copy-closure/nix-copy-closure.cc index dfb1b8fc5..fdcde8b07 100755 --- a/src/nix-copy-closure/nix-copy-closure.cc +++ b/src/nix-copy-closure/nix-copy-closure.cc @@ -1,13 +1,12 @@ #include "shared.hh" #include "store-api.hh" +#include "legacy.hh" using namespace nix; -int main(int argc, char ** argv) +static int _main(int argc, char ** argv) { - return handleExceptions(argv[0], [&]() { - initNix(); - + { auto gzip = false; auto toMode = true; auto includeOutputs = false; @@ -61,5 +60,9 @@ int main(int argc, char ** argv) from->computeFSClosure(storePaths2, closure, false, includeOutputs); copyPaths(from, to, closure, NoRepair, NoCheckSigs, useSubstitutes); - }); + + return 0; + } } + +static RegisterLegacyCommand s1("nix-copy-closure", _main); |