Open Strum355 opened 1 year ago
FormatOrString was removed circa May 2023 - https://github.com/NixOS/nix/pull/7942/files#diff-582ac9be5f0df2848431cd328c50c3c0475e1636ac2f5d9a88b2fdcedc01cc10R18
Rough changes needed to get nix-otel to compile follow....
--- a/plugin/src/activity.rs
+++ b/plugin/src/activity.rs
@@ -83,7 +83,7 @@ pub unsafe fn unmarshal_string(s: &FfiString) -> String {
pub unsafe fn unmarshal_field(field: &FfiField) -> Field {
match field {
FfiField::String(s) => Field::String(unsafe { unmarshal_string(s) }),
- FfiField::Num(n) => (Field::Num(*n)),
+ FfiField::Num(n) => Field::Num(*n),
}
}
--- a/plugin/plugin.cpp
+++ b/plugin/plugin.cpp
@@ -122,8 +122,8 @@ public:
bool isVerbose() override { return upstream->isVerbose(); }
- void log(Verbosity lvl, const FormatOrString &fs) override {
- upstream->log(lvl, fs);
+ void log(Verbosity lvl, std::string_view s) override {
+ upstream->log(lvl, s);
}
void logEI(const ErrorInfo &ei) override { upstream->logEI(ei); }
I should really probably archive this repo. It's a proof of concept mostly, and isn't actively updated to new Nix versions.
Adding
lf-/nix-otel
as a flake input just plainly likeinputs.nix-otel.url = "github:lf-/nix-otel"
is at the time of writing using nixpkgs ate18dc963075ed115afb3e312b64643bf8fd4b474
, which results in nix-otel failing to build with: