Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/interface.rs
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,10 @@ pub struct SearchArgs {
/// Name of the channel to query (e.g nixos-23.11, nixos-unstable, etc)
pub channel: String,

#[arg(long, short = 'P')]
/// Show supported platforms for each package
pub platforms: bool,

/// Name of the package to search
pub query: Vec<String>,
}
Expand Down
4 changes: 4 additions & 0 deletions src/search.rs
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,10 @@ impl SearchArgs {
}
}

if self.platforms && !elem.package_platforms.is_empty() {
println!(" Platforms: {}", elem.package_platforms.join(", "));
}

if let Some(position) = &elem.package_position {
let position = position.split(':').next().unwrap();
print!(" Defined at: ");
Expand Down