Small example repository for packaging shell applications with a Nix flake. It demonstrates multiple installed executables, build-time path substitution, a wrapped runtime dependency, an icon, and a generated desktop entry.
The checked-in example installs exemple and exemple-2; it is intentionally
minimal and should be renamed when creating a real package.
git clone https://github.com/RevolunixOS/pkg-template.git
cd pkg-template
nix build
nix run- Rename the scripts in
src/. - Update
pname,version, display name, and description inpackage.nix. - Replace the icon and desktop-entry fields, or remove them for a CLI-only tool.
- Update
substituteInPlacefor internal executable paths. - Add every runtime command to
lib.makeBinPath. - Correct the homepage, license metadata, platforms, and main program.
- Run
nix fmt,nix build, and the installed program.
flake.nix x86_64-linux output and Alejandra formatter
default.nix traditional callPackage entry point
package.nix derivation and installation logic
src/ example scripts and icon
The flake currently pins NixOS 24.05 and exports only x86_64-linux.
See LICENSE.