Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Export to .deb, .rpm… #93

Open
tobiasBora opened this issue Feb 17, 2023 · 2 comments
Open

Export to .deb, .rpm… #93

tobiasBora opened this issue Feb 17, 2023 · 2 comments

Comments

@tobiasBora
Copy link

tobiasBora commented Feb 17, 2023

It would be great to provide a way to bundle deb/rpm/… packages. While nix's derivation are made to work when running in /nix/store, I guess in 95% of the cases we can easily "unpatch" them to run in a regular FHS path, by removing RPATH, wrappers, and by patching back elf files to point to /lib. And dependencies could be obtained by reading some database, similar to how nix-index works bbut for other systems… or by manually listing them or using passthru.

This could provide a huge value to Nix as discussed here https://discourse.nixos.org/t/automatically-generating-deb-packages-from-nixpkgs/25420/18

@tgunnoe
Copy link

tgunnoe commented Feb 17, 2023

There's already support for toDeb and toRpm in the official bundlers (which also use nix-bundle): https://github.com/nixos/bundlers

@tobiasBora
Copy link
Author

Thanks for the pointer, but as I understand it recreates stuff in /nix/store (based of fpm, see code in https://github.com/juliosueiras-nix/nix-utils/blob/b44e1ffd726aa03056db9df469efb497d8b9871b/utils/rpm-deb/default.nix#L129), so it's certainly more reliable, but it is less interesting for true packaging as it does not share libraries with the host system.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants