Remove 'nix flake archive'

This is because flakes are no longer substitutable.
This commit is contained in:
Eelco Dolstra 2022-06-02 14:41:36 +02:00
parent 76c71c015b
commit 9d772bbf96
No known key found for this signature in database
GPG key ID: 8170B4726D7198DE

View file

@ -863,6 +863,7 @@ struct CmdFlakeClone : FlakeCommand
} }
}; };
#if 0
struct CmdFlakeArchive : FlakeCommand, MixJSON, MixDryRun struct CmdFlakeArchive : FlakeCommand, MixJSON, MixDryRun
{ {
std::string dstUri; std::string dstUri;
@ -897,8 +898,6 @@ struct CmdFlakeArchive : FlakeCommand, MixJSON, MixDryRun
StorePathSet sources; StorePathSet sources;
throw UnimplementedError("flake archive");
#if 0
sources.insert(flake.flake.sourceInfo->storePath); sources.insert(flake.flake.sourceInfo->storePath);
if (jsonRoot) if (jsonRoot)
jsonRoot->attr("path", store->printStorePath(flake.flake.sourceInfo->storePath)); jsonRoot->attr("path", store->printStorePath(flake.flake.sourceInfo->storePath));
@ -929,9 +928,9 @@ struct CmdFlakeArchive : FlakeCommand, MixJSON, MixDryRun
ref<Store> dstStore = dstUri.empty() ? openStore() : openStore(dstUri); ref<Store> dstStore = dstUri.empty() ? openStore() : openStore(dstUri);
copyPaths(*store, *dstStore, sources); copyPaths(*store, *dstStore, sources);
} }
#endif
} }
}; };
#endif
struct CmdFlakeShow : FlakeCommand, MixJSON struct CmdFlakeShow : FlakeCommand, MixJSON
{ {
@ -1193,7 +1192,7 @@ struct CmdFlake : NixMultiCommand
{"init", []() { return make_ref<CmdFlakeInit>(); }}, {"init", []() { return make_ref<CmdFlakeInit>(); }},
{"new", []() { return make_ref<CmdFlakeNew>(); }}, {"new", []() { return make_ref<CmdFlakeNew>(); }},
{"clone", []() { return make_ref<CmdFlakeClone>(); }}, {"clone", []() { return make_ref<CmdFlakeClone>(); }},
{"archive", []() { return make_ref<CmdFlakeArchive>(); }}, //{"archive", []() { return make_ref<CmdFlakeArchive>(); }},
{"show", []() { return make_ref<CmdFlakeShow>(); }}, {"show", []() { return make_ref<CmdFlakeShow>(); }},
{"prefetch", []() { return make_ref<CmdFlakePrefetch>(); }}, {"prefetch", []() { return make_ref<CmdFlakePrefetch>(); }},
}) })