- Rust 83.3%
- Nix 16.7%
|
|
||
|---|---|---|
| .github | ||
| src | ||
| .envrc | ||
| .gitignore | ||
| Cargo.lock | ||
| Cargo.toml | ||
| default.nix | ||
| flake.lock | ||
| flake.nix | ||
| LICENSE | ||
| README.md | ||
| shell.nix | ||
Generate nixpkgs sqlite databases.
About
A utility to obtain package databse from nixos database in form of json and convert it to sqlite databases.
This repository itself is later used at xinux-org/database
Development
The project has shell.nix which has development environment preconfigured already for you. Just open your
terminal and at the root of this project:
# Open in bash by default
nix develop
# If you want other shell
nix develop -c $SHELL
# After entering Nix development environment,
# inside the env, you can open your editor, so
# your editor will read all $PATH and environmental
# variables, also your terminal inside your editor
# will adopt all variables, so, you can close terminal.
# Neovim
vim .
# VSCode
code .
# Zed Editor
zed .
The development environment has whatever you may need already, but feel free to add or remove whatever
inside shell.nix.
Logging
If you need more detailed logs from generator, add RUST_LOG and append whatever type of logs you would need to get, just like that:
# You can use debug, error or info instead of generator
# It just filters logs only from the project itself
RUST_LOG=generator cargo run -- --ver nixos-unstable --src nixos-unstable
Building
Well, there are two ways of building your project. You can either go with classic cargo build way, but before that, make sure to enter development environment to have cargo and all rust toolchain available in your PATH, you may do like that:
# Entering development environment
nix develop -c $SHELL
# Compile the project
cargo build --release
Or, you can build your project via nix which will do all the dirty work for you. Just, in your terminal:
# Build in nix environment
nix build
# Executable binary is available at:
./result/bin/generator
License
This project is licensed under the MIT license - see the LICENSE file for details.