[M8] cargoxx-pkgs as a flake: cargoxx add → string-form dep
Wrapper: fix cache.nixos.org-1 key; drop AppImage; pin publish to mozart/cargoxx-pkgs.
This commit is contained in:
@@ -76,6 +76,12 @@ auto parse_package(const toml::table& tbl, const std::filesystem::path& path)
|
||||
if (auto v = tbl["nixpkgs_rev"].value<std::string>()) {
|
||||
pkg.nixpkgs_rev = *v;
|
||||
}
|
||||
if (auto v = tbl["cargoxx_pkgs_attr"].value<std::string>()) {
|
||||
pkg.cargoxx_pkgs_attr = *v;
|
||||
}
|
||||
if (auto v = tbl["cargoxx_pkgs_rev"].value<std::string>()) {
|
||||
pkg.cargoxx_pkgs_rev = *v;
|
||||
}
|
||||
if (auto v = tbl["linkdb_source"].value<std::string>()) {
|
||||
pkg.linkdb_source = *v;
|
||||
}
|
||||
@@ -200,6 +206,12 @@ auto write(const Lockfile& lock, const std::filesystem::path& path) -> util::Res
|
||||
if (p.nixpkgs_rev) {
|
||||
tbl.insert_or_assign("nixpkgs_rev", *p.nixpkgs_rev);
|
||||
}
|
||||
if (p.cargoxx_pkgs_attr) {
|
||||
tbl.insert_or_assign("cargoxx_pkgs_attr", *p.cargoxx_pkgs_attr);
|
||||
}
|
||||
if (p.cargoxx_pkgs_rev) {
|
||||
tbl.insert_or_assign("cargoxx_pkgs_rev", *p.cargoxx_pkgs_rev);
|
||||
}
|
||||
if (p.linkdb_source) {
|
||||
tbl.insert_or_assign("linkdb_source", *p.linkdb_source);
|
||||
}
|
||||
|
||||
@@ -12,6 +12,13 @@ struct LockfilePackage {
|
||||
std::vector<std::string> dependencies;
|
||||
std::optional<std::string> nixpkgs_attr;
|
||||
std::optional<std::string> nixpkgs_rev;
|
||||
// Parallel to nixpkgs_attr/rev: the dep was resolved through the
|
||||
// cargoxx-pkgs flake (https://git.amadey.xyz/mozart/cargoxx-pkgs).
|
||||
// `cargoxx_pkgs_attr` is the attribute name in
|
||||
// `cargoxx-pkgs.packages.<system>` (e.g. "greeter_0_1_1"), and
|
||||
// `cargoxx_pkgs_rev` pins the cargoxx-pkgs repo itself.
|
||||
std::optional<std::string> cargoxx_pkgs_attr;
|
||||
std::optional<std::string> cargoxx_pkgs_rev;
|
||||
std::optional<std::string> linkdb_source;
|
||||
std::optional<std::string> find_package;
|
||||
std::vector<std::string> targets;
|
||||
@@ -19,9 +26,8 @@ struct LockfilePackage {
|
||||
std::vector<std::string> brute_force_libs;
|
||||
std::vector<std::string> brute_force_includes;
|
||||
// For cargoxx-source deps (not nixpkgs/linkdb-resolved).
|
||||
// "cargoxx-path" → source_path only
|
||||
// "cargoxx-git" → source_git_url + source_git_commit + source_git_sha256
|
||||
// "cargoxx-registry" → (1d)
|
||||
// "cargoxx-path" → source_path only
|
||||
// "cargoxx-git" → source_git_url + source_git_commit + source_git_sha256
|
||||
std::optional<std::string> source_kind;
|
||||
std::optional<std::string> source_path;
|
||||
std::optional<std::string> source_git_url;
|
||||
|
||||
Reference in New Issue
Block a user