aboutsummaryrefslogtreecommitdiff
path: root/src/nix/copy.cc
AgeCommit message (Collapse)Author
2020-06-16Remove StorePath::clone() and related functionsEelco Dolstra
2020-05-05nix --help: Group commandsEelco Dolstra
2020-05-04Flag: Use designated initializersEelco Dolstra
2019-12-10Make the Store API more type-safeEelco Dolstra
Most functions now take a StorePath argument rather than a Path (which is just an alias for std::string). The StorePath constructor ensures that the path is syntactically correct (i.e. it looks like <store-dir>/<base32-hash>-<name>). Similarly, functions like buildPaths() now take a StorePathWithOutputs, rather than abusing Path by adding a '!<outputs>' suffix. Note that the StorePath type is implemented in Rust. This involves some hackery to allow Rust values to be used directly in C++, via a helper type whose destructor calls the Rust type's drop() function. The main issue is the dynamic nature of C++ move semantics: after we have moved a Rust value, we should not call the drop function on the original value. So when we move a value, we set the original value to bitwise zero, and the destructor only calls drop() if the value is not bitwise zero. This should be sufficient for most types. Also lots of minor cleanups to the C++ API to make it more modern (e.g. using std::optional and std::string_view in some places).
2019-12-05Make subcommand construction in MultiCommand lazyEelco Dolstra
(cherry picked from commit a0de58f471c9087d8e6cc60a6078f9940a125b15)
2019-07-10nix copy: Rename --substitute to --substitute-on-destinationEelco Dolstra
'--substitute' was being shadowed by the regular '--substitute' (the short-hand for '--option substitute true'). Fixes #2983.
2018-09-27Don't talk about a "current folder build output"Eelco Dolstra
Presumably this refers to ./default.nix but the support for that in 'nix' is tenuous. Also folders are a Mac thing.
2018-08-02s3 binary cache: support specifying an endpointGraham Christensen
Works for uploading and not downloading.
2018-03-30nix copy: add an example with S3zimbatm
I couldn't find a good example how to use it with non-us-east-1 buckets.
2018-02-21nix-copy: fix examplesJörg Thalheim
maybe a left-over from nix-store -r ?
2017-10-24nix: Respect -I, --arg, --argstrEelco Dolstra
Also, random cleanup to argument handling.
2017-09-27nix copy: make recursive by defaultEelco Dolstra
2017-09-08nix copy: Add --substitute flagEelco Dolstra
2017-09-08nix copy: Add examplesEelco Dolstra
2017-09-06nix build: Add --out-link and --no-link optionsEelco Dolstra
2017-08-16nix copy: Add --no-check-sigs flagEelco Dolstra
2017-07-30Replace Unicode quotes in user-facing strings by ASCIIJörg Thalheim
Relevant RFC: NixOS/rfcs#4 $ ag -l | xargs sed -i -e "/\"/s/’/'/g;/\"/s/‘/'/g"
2017-03-16nix copy: Make -r option use the "from" storeEelco Dolstra
Previously, we tried to compute the closure in the local store, which obviously doesn't work.
2017-03-16copyPaths(): Use queryValidPaths() to reduce SSH latencyEelco Dolstra
2016-11-10build-remote: Implement in C++Shea Levy
2016-09-02Merge openStore and openStoreAt with default argumentsShea Levy
2016-05-04Add a copyStorePath() utility functionEelco Dolstra
2016-04-25Improved logging abstractionEelco Dolstra
This also gets rid of --log-type, since the nested log type isn't useful in a multi-threaded situation, and nobody cares about the "pretty" log type.
2016-04-22Factor out parallel processing of work items that have dependenciesEelco Dolstra
2016-04-22nix copy: ParalleliseEelco Dolstra
2016-04-22Add "nix copy" commandEelco Dolstra
This replaces nix-push. For example, $ nix copy --to file:///tmp/cache -r $(type -p firefox) copies the closure of firefox to the specified binary cache. And $ nix copy --from file:///tmp/cache --to s3://my-cache /nix/store/abcd... copies between two binary caches. It will also replace nix-copy-closure, once we have an SSHStore class, e.g. $ nix copy --from ssh://alice@machine /nix/store/abcd...