pub struct NixpkgsBridge {
pub pkg_set: Option<String>,
pub known_names: Vec<String>,
pub label: String,
}Expand description
Bridges a list of names through to an existing Nix expression universe.
By default that’s import <nixpkgs> {}, but any expression that yields an
attribute set will do (flake revisions, release.nix, a private overlay).
Fields§
§pkg_set: Option<String>Nix expression evaluating to the attribute root. Default: "import <nixpkgs> {}".
known_names: Vec<String>Names this bridge claims to know. Empty list = “open universe” — any name resolves. Non-empty list = closed universe (used for mirror gen).
label: StringHuman label for logs.
Implementations§
Source§impl NixpkgsBridge
impl NixpkgsBridge
pub fn new() -> Self
pub fn with_pkg_set(self, expr: impl Into<String>) -> Self
pub fn with_names(self, names: Vec<String>) -> Self
pub fn with_label(self, label: impl Into<String>) -> Self
Sourcepub fn derivation(&self, attr_path: impl Into<String>) -> Derivation
pub fn derivation(&self, attr_path: impl Into<String>) -> Derivation
Build a Derivation for a name without consulting known_names.
Useful when you’re sure the attr exists upstream.
Trait Implementations§
Source§impl Default for NixpkgsBridge
impl Default for NixpkgsBridge
Source§impl PackageSet for NixpkgsBridge
impl PackageSet for NixpkgsBridge
Source§fn get(&self, name: &str) -> Result<PackageLookup, PackageSetError>
fn get(&self, name: &str) -> Result<PackageLookup, PackageSetError>
Retrieve the derivation for a named package.
None if not present.Auto Trait Implementations§
impl Freeze for NixpkgsBridge
impl RefUnwindSafe for NixpkgsBridge
impl Send for NixpkgsBridge
impl Sync for NixpkgsBridge
impl Unpin for NixpkgsBridge
impl UnsafeUnpin for NixpkgsBridge
impl UnwindSafe for NixpkgsBridge
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more