back to home

wamserma / flake-programs-sqlite

A simple flake to automagically specify programs.sqlite for command-not-found.

54 stars
1 forks
7 issues
NimNixShell

AI Architecture Analysis

This repository is indexed by RepoMind. By analyzing wamserma/flake-programs-sqlite in our AI interface, you can instantly generate complete architecture diagrams, visualize control flows, and perform automated security audits across the entire codebase.

Our Agentic Context Augmented Generation (Agentic CAG) engine loads full source files into context on-demand, avoiding the fragmentation of traditional RAG systems. Ask questions about the architecture, dependencies, or specific features to see it in action.

Source files are only loaded when you start an analysis to optimize performance.

Embed this Badge

Showcase RepoMind's analysis directly in your repository's README.

[![Analyzed by RepoMind](https://img.shields.io/badge/Analyzed%20by-RepoMind-4F46E5?style=for-the-badge)](https://repomind.in/repo/wamserma/flake-programs-sqlite)
Preview:Analyzed by RepoMind

Repository Overview (README excerpt)

Crawler view

programs.sqlite for Nix Flake based systems TL;DR (assuming a flake similar to ) Add to in : Then just add the module. NixOS module Usage with a minimal system flake: The module's functionality is enabled as soon as the module is imported. Home Manager module A Home Manager module is also provided in the Flake output . Like the NixOS module, its functionality is enabled as soon as it's imported. alternative: without using a module Add to the arguments of the flake's function. Add to the argument of . Add to the inputs of your system configuration ( ) and to the configuration itself add: Why? NixOS systems configured with flakes and thus lacking channels usually have a broken . The reason is that the backing database is only available on channels. The problem is that the channel URL can not be determined from the revision alone, as it also contains a build number. command-not-what? Bash and other shells have a special handler that is invoked when an unknown command is issued to the shell. For bash this is . is a Perl script that is hooked into this handler when the option is set to . This perl script evaluates a pre-made database to suggest packages that might be able to provide the command. The pre-made database is generated as part of a channel, hence pure-flake-systems do not have access to it. This flake extracts the database from the channels and passes it to the script to restore functionality that was previously only available when using channels. This is an attempt to provide a usable solution, motivated by How? The channel page is regularly scraped for the revision and file hashes, then a lookup table from revisions to URL and hashes is amended with any new information. The lookup table is used to create a fixed-output-derivation (FOD) for based on the revision of passed as input of this flake. Usage see TL:DR above Development The flake provides a minimal devshell, but hacking on the code with a editor and running is valid, too. Development happens on the branch, which is then merged into the branch. Updates to the JSON file go directly to . Releases of the tooling are also cut from the branch. There are no releases for the JSON files. Fetching selected channel revisions e.g. to fetch info for older revisions/releases from before this project was started Multiple channels/revisions may be passed for a single run. If no channel is given, the current channels are guessed and their latest revisions are fetched. Alternatives • nix-index Licensing The Nim code to scrape the metadata is released under MIT License. The Nix code to provide the FODs is released under MIT License. The database itself (JSON) is public domain.