Crate nixman

Crate nixman 

Source
Expand description

Library for the nixman package manager

Provides core types and functions for synchronizing Arch Linux packages with a YAML configuration file, parsing package lists, and handling versioning.

§Modules

  • versioning: Pacman version string parsing and utilities

§Example

use nixman::{ensure_yml, write_package_list_to_yaml, parse_explicit_packages};
let yml_path = ensure_yml().unwrap();
let pkgs = parse_explicit_packages("htop 1.0.0-1", true);
write_package_list_to_yaml(&pkgs, &yml_path).unwrap();

Modules§

pacman
Simple wrapper for pacman command invocations
versioning
Pacman Versioning Utilities

Structs§

Package
PackageList

Functions§

apply_packages_from_yaml
Apply the YAML configuration to synchronize installed packages.
ensure_yml
Ensures the XDG-compliant YML file exists. (~/.config/nixman/packages.yaml)
parse_explicit_packages
Parse the output of pacman -Qe into a PackageList, optionally versioned.
sync_packages_from_yaml
Synchronize installed packages with the list in the YAML file.
write_package_list_to_yaml
Write a package list to a YAML file at the given path.