aboutsummaryrefslogtreecommitdiff
path: root/src/nix/copy.cc
diff options
context:
space:
mode:
authorregnat <rg@regnat.ovh>2020-12-14 17:24:30 +0100
committerregnat <rg@regnat.ovh>2021-01-28 09:38:44 +0100
commit9355ecd54301372b6a919a2205340f904c7a51c6 (patch)
tree94f055cc7c91e90dba6ca4f8dc325c95ca34a8f1 /src/nix/copy.cc
parentb8f345b29a65669f4d6966ba3837fda2341c5ec2 (diff)
Add a new Cmd type working on RealisedPaths
Where a `RealisedPath` is a store path with its history, meaning either an opaque path for stuff that has been directly added to the store, or a `Realisation` for stuff that has been built by a derivation This is a low-level refactoring that doesn't bring anything by itself (except a few dozen extra lines of code :/ ), but raising the abstraction level a bit is important on a number of levels: - Commands like `nix build` have to query for the realisations after the build is finished which is fragile (see 27905f12e4a7207450abe37c9ed78e31603b67e1 for example). Having them oprate directly at the realisation level would avoid that - Others like `nix copy` currently operate directly on (built) store paths, but need a bit more information as they will need to register the realisations on the remote side
Diffstat (limited to 'src/nix/copy.cc')
-rw-r--r--src/nix/copy.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/nix/copy.cc b/src/nix/copy.cc
index f15031a45..c56a1def1 100644
--- a/src/nix/copy.cc
+++ b/src/nix/copy.cc
@@ -16,6 +16,8 @@ struct CmdCopy : StorePathsCommand
SubstituteFlag substitute = NoSubstitute;
+ using StorePathsCommand::run;
+
CmdCopy()
: StorePathsCommand(true)
{