aboutsummaryrefslogtreecommitdiff
path: root/src/nix-copy-closure/nix-copy-closure.cc
AgeCommit message (Collapse)Author
2024-03-04Merge pull request #9277 from keszybz/file-permissionseldritch horrors
Remove stray executable permissions on source files (cherry picked from commit a80fb9fa398cf39472be800b42020d2ff4a0df42) Change-Id: I603b18ddda76041991101ef0597ec804c2b55dc0
2023-03-02Remove FormatOrString and remaining uses of format()Eelco Dolstra
2021-07-22copyPaths: Pass store by referenceEelco Dolstra
2021-07-22nix-build: Copy drv closure between eval store and build storeEelco Dolstra
2021-02-25Use `RealisedPath`s in `copyPaths`regnat
That way we can copy the realisations too (in addition to the store paths themselves)
2021-02-24Initialize plugins after handling initial command line flagsShea Levy
This is technically a breaking change, since attempting to set plugin files after the first non-flag argument will now throw an error. This is acceptable given the relative lack of stability in a plugin interface and the need to tie the knot somewhere once plugins can actually define new subcommands.
2021-01-26Move command plugin interface to libnixcmdShea Levy
2020-10-06Remove static variable name clashesEelco Dolstra
This was useful for an experiment with building Nix as a single compilation unit. It's not very useful otherwise but also doesn't hurt...
2020-03-30Remove global -I flagsEelco Dolstra
(cherry picked from commit 2c692a3b144523bca68dd6de618124ba6c9bb332)
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).
2018-10-26Merge all nix-* binaries into nixEelco Dolstra
These are all symlinks to 'nix' now, reducing the installed size by about ~1.7 MiB.
2018-02-08Add plugins to make Nix more extensible.Shea Levy
All plugins in plugin-files will be dlopened, allowing them to statically construct instances of the various Register* types Nix supports.
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-07-03Replace a few bool flags with enumsEelco Dolstra
Functions like copyClosure() had 3 bool arguments, which creates a severe risk of mixing up arguments. Also, implement copyClosure() using copyPaths().
2017-05-01build-remote: Don't require signaturesEelco Dolstra
This restores the old behaviour.
2017-03-16ssh:// -> ssh-ng://, legacy-ssh:// -> ssh://Eelco Dolstra
2017-03-16copyPaths(): Use queryValidPaths() to reduce SSH latencyEelco Dolstra
2017-03-16nix-copy-closure: Fix assertion failureEelco Dolstra
$ ./inst/bin/nix-copy-closure --to bla $(type -p firefox) nix-copy-closure: src/libstore/store-api.cc:80: std::__cxx11::string nix::storePathToHash(const Path&): Assertion `base.size() >= storePathHashLen' failed.
2017-02-07nix-copy-closure: Use computeFSClosure() and LegacySSHStoreEelco Dolstra
2017-01-20nix-copy-closure: Implement in C++.Shea Levy
Tests fail currently because the database is not given proper hashes in the VM