nix_data/cache/
mod.rs

1use std::collections::HashMap;
2
3use ijson::IString;
4use serde::{Deserialize, Serialize};
5
6/// Cache and determine packages installed on legacy NixOS and with `nix-env`
7pub mod channel;
8/// Cache and determine packages installed on flakes enabled NixOS
9pub mod flakes;
10/// Cache latest NixOS `packages.json` and `options.json`
11pub mod nixos;
12/// Cache and determine packages installed with `nix profile`
13pub mod profile;
14/// Nixpkgs cache on non-NixOS
15pub mod nonnixos;
16
17#[derive(Debug, Deserialize)]
18struct NixPkgList {
19    packages: HashMap<String, NixPkg>,
20}
21
22#[derive(Debug, Serialize, Deserialize, Clone)]
23struct NixPkg {
24    pname: IString,
25    version: IString,
26}