-
Notifications
You must be signed in to change notification settings - Fork 44
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
Makefile: installer respecting --prefix
breaks assumptions in existing packages
#346
Comments
You're right. This makes me think the old behaviour was probably wrong, but all packaging efforts must have been working around the behaviour. On the other hand, maybe this installation step is targeting I'm not familiar enough with python or this project to say confidently 😅 |
For the in-tree nix package specifically, this can be handled by #347. IDK if this also affects other packaging efforts though. |
To clarify, where exactly are you seeing the behaviour change and assumptions breaking as result of your pull request that directly affect other packaging efforts? Because I can confirm that neither the Ubuntu, Debian, nor RPM artifacts are affected from your change. Unless I am missing something, they are functional and the directory structure within the Python site packages directory are still what's expected. Also, nesting PYTHONDIR below PREFIX is abnormal and the Makefile in the repo does not do that. |
I've only observed it in the in-tree flake package. Whether other packages are affected is pure speculation and uncertainty on my part.
That's reassuring, thanks for checking!
Thanks for the context. Due to the nature of how nix packages are installed, everything must be prefixed in this package's nix-store path ( We can achieve that by setting the make-variable The issues with the in-tree flake package turned out to be trivial install path collisions, resolved by #347. If no other packages are affected, then that pr fixes this issue. |
Closing as #347 was merged that fixes the install path collisions. |
In #343 I "fixed" the caller to
python -m installer
to respect--prefix
and--destdir
when set.This fixed some issues we had packaging umu-launcher in nixpkgs, however it has also changed the makefile's behaviour breaking assumptions for (all?) other packaging efforts.
I'm not familiar enough with umu or python to know exactly what this installation step is doing, how PREFIX, DESTDIR, and PYTHONDIR fit into the picture, etc.
Nixpkgs can be a bit confusing when compared to other packaging systems. The package's files should be installed into the prefix
$out
instead of the typical/usr
. This allows every package to have its own isolated prefix.Note that
$out
is the actual prefix installed to on the system. It is not a DESTDIR that should be treated as a fs-root.The in-tree nix package (/packaging/nix/) seems to have several workarounds to move files into the correct location. The nixpkgs package however attempted to use
PREFIX
andPYTHONDIR
to tell the makefile to install to the correct location without any additional steps.https://github.com/NixOS/nixpkgs/blob/9e1c4ffd677cdd1bfed9a84a80948f6c751b70ac/pkgs/by-name/um/umu-launcher-unwrapped/package.nix#L49-L55
Is nesting
PYTHONDIR
below PREFIX normal or abnormal when packaging python apps?Originally reported as #317 (comment)
Some additional discussion in that thread
cc @R1kaB3rN @beh-10257 @Hexa @natsukium
The text was updated successfully, but these errors were encountered: