Note that `"auto"` holds a strange middle ground, reading
part of the general environment, but not all of it. It
ignores `NIX_REMOTE` and the `store` option.
(cherry picked from commit 7ba92a3793c2fe11938e802e6b61edee042b193a)
... because it is. I had previously dismissed the comparatively
trivial unsafety of these functions, assuming the caller is
aware of the purpose of them and reasonably familiar with manual
memory management.
That would have been fine in an unsafe by default language like C++,
which Rust is not.
(cherry picked from commit b43455fdd0468f067741a79a7031ba2fa907f0eb)
Fixes https://github.com/nixops4/nixops4/issues/65,
possible undefined behavior.
This doesn't make the code nice wrt *const/*mut distinction, but
since we're not mutating it, this should be fine.
(cherry picked from commit 75d448aad923a5f835f0562400e223df43103ea4)
This is slightly easier to use than the previous pattern that was
always followed up by the same conversions.
(cherry picked from commit 756c080730cd4fa81d4c0e3a99688cbe8debe57f)