Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
[WIP] Recursive debian packages #58777
We (as in "my employer and I") need to package software for debianoids (and RPM, but we're only looking into debian here).
But, we need to ship .deb/.rpm packages. That is obviously not that easy with nixpkgs. There is support for building debian packages, which is
So what am I doing here is: I try to build a whole dependency tree (all transitive dependencies) of a package as debian packages.
I want to work with only nixpkgs and nix, no other tooling required
I can build a nixpkgs package and I get all required dependencies as
My functions can generate the attribute sets for the builder function (
Unfortunately, I can not do the full job:
And I just do not get where this error comes from.
So if some can have a look at my patches, I would welcome
This is WIP and should not be considered for inclusion.
Required for debugging when developing with the debBuild function. Signed-off-by: Matthias Beyer <firstname.lastname@example.org>
This line  does not seem to do the right thing.
Replacing it with this seems to do what you want. There is still an bug with multiple layers of debs, but perhaps this would help track down the error.
Side note: in the past i've used https://github.com/matthewbauer/nix-bundle as a way to solve a similar problem (used the appimage approach). It made the .deb installs completely independent of the debian host - which was convenient.
Now I get to build something, yay.
But the output hangs for hours (it literally has been about 1.5 hrs right now) at
When building with
The latest patch does not even work. I don't know what is going on. What I tried:
So I constantly get
No matter what I try. I even hard-coded "name" in
So the last patch rewrites some debian-build infrastructure (which was in nixpkgs before I started this PR) and now it compiles for me (only a no-dependency-package):
But as you can see, only the dependency of
This commit rewrites the debian-build expression because it was cluttered with uneccessary attribute sets. All sets were merged into one set. The attribute "name" was renamed so it can more easily be distinguished from the "name" attribute of the resulting set. This somehow fixes the build of debian packages in `pkgs.buildRecDebpkg.makeDeb`. I don't know why.
So what I debugged:
But then trying to
So I'm not sure where the error is here, but I assume that the image is missing some stuff. Someone with more knowledge about the whole setup should probably help me investigate because this might be totally wrong.
Thank you for your contributions.