Skip to content

jian-lin/nix2deb

Repository files navigation

nix2deb

Convert a Nix package to a deb package using other deb packages as dependencies.

In other words, like nix-bundle, but with its #93 fixed.

Usage

Generate a test deb package:

nix run github:jian-lin/nix2deb -- \
  --nix-installable github:jian-lin/nix2deb#testExe \
  --suite noble \
  $(nix build github:jian-lin/nix2deb#testExe --print-out-paths --no-link)

Optionally, inspect the generated deb package using dpkg-deb command:

dpkg-deb --info test-exe.deb
dpkg-deb --contents test-exe.deb

Test the generated package by copying it to Ubuntu and running these commands:

# install
sudo apt install ./test-exe.deb
# verify the installed binary works
test-exe
# optional: uninstall
sudo apt remove test-exe && sudo apt autoremove

Manual

Run nix2deb with --help to see the manual:

nix run github:jian-lin/nix2deb -- --help

Development

Enter the development environment:

nix develop

License

MIT

About

Convert a Nix package to a deb package using other deb packages as dependencies

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Contributors