exfetch.nix
exfetch.nix
nix packaging for Izder456/exfetch
Dependencies
- nix
Any packaging dependencies should be provided by nix/nixpkgs through the nix expression.
The package source repository itself is referenced by the nix expression and pulled in during the build, along with all its dependencies.
Build
From repository root:
$ nix-build .
or (using flake interface)
$ nix build
This would build the package from source, producing a derivation and putting the resulting build package in the nix store, along with a symlink to it at ./result.
Check the symlink to inspect the resulting package tree:
$ readlink ./result
$ tree ./result/
To check the deriver(.drv file):
$ nix-store -q -d (readlink result)
Maintenance
Updating dependencies
Crystal dependencies are converted to nix dependencies using crystal2nix.
To update the shards.nix file:
- clone the source repository:
git clone <repo url>(see default.nix for source repo url); - checkout the desired ref(commit, tag, branch head);
- inside the source repository, run
nix-shell -p pkgs.crystal2nix --run crystal2nix; - copy over the new
shards.nixto this repository; - build and test, i.e.
nix-build; ./result/bin/exfetch; - commit and publish the updated shards.nix.
Updating package version
To provide a new version of the source package:
- follow above procedure to generate
shards.nixfrom a checkout of the source repository at the desired version; - update the
default.nixfile with the new version, i.e.sed -ir "s/version = '.+';/version = '$version';/"; - build and test, i.e.
nix-build; ./result/bin/exfetch; - commit and publish updated nix files.
Using nix flake
The flake.nix enables support for flake-based workflow.
- try out this package with a single nix command:
nix run 'git+https://codeberg.org/DrPyser/exfetch.nix#exfetch' - enter a shell with the target package available:
$ nix shell 'git+https://codeberg.org/DrPyser/exfetch.nix'
exfetch.nix
- 0
- 0
- 0
- 0
- 0
- 7 months ago
- June 29, 2025
Fri, 30 Jan 2026 12:58:29 GMT