-
-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
nix-shell -p qt5.qtbase drops files into my current directory #27174
Comments
The files are created by I know a |
Is a ugly workaround for qmake.
will be
|
One could start by changing the qmake hook from doing "mkdir x" (fails on 2nd invokation) to "rm -rf x; mkdir x". |
Wait wait, can we first clarify why this should put anything into my directory? Ideally I'd really not have it put anything into my current directory (also, there is no guarentee that I can even write into the current directory; I could be in |
CC @ttuegel, who knows the qmake hook much better than I. |
It's not the Qt absolutely cannot tolerate having different modules installed in different prefixes. At the start of each build, we link all the active modules for the current build into a temporary location. Then we lie to Qt and pretend it was installed to that temporary prefix. The only alternative is going back to building all Qt modules as one giant monster package. The temporary prefix is supposed be in |
@ttuegel hack with nix_qt5 was introduced to avoid impurity from |
@ttuegel So for you, |
@nh2 No, I mean: when I wrote the code, I wanted the directory to be in
@avnik The builder is ultimately still impure because it would contain the value of I don't know which paths are included, but an educated guess: paths to header files, pulled in by
@avnik That would be great, but I do not know a way to create a derivation inside a builder. |
@ttuegel you was approved this (current) approach in #20856 and specifically, because
Not in builder, but in expression (I put example in one of comments above) |
The problem with this approach is: In the immediate term: Long term, I think the only solution which solves all our problems is to fix Qt so it does not reference the temporary paths.
It is... probable... that I did not understand what I was agreeing to. 😺 |
Fallback to `mktemp -d` for temporary QT root, if invoked in shell mode. Should fix problem from NixOS#27174.
Are there any plans to get these fixes/workarounds into a release? |
I thought so, but I guess it was just an old I tried
as well as
and neither did produce a new |
Running
nix-shell -p qt5.qtbase
the first time works.Running it again produces
mkdir: cannot create directory ‘/path/to/pwd/__nix_qt5__/bin’: File exists
.And indeed the first invocation created:
Is this expected? I thought nix-shell by itself should never put stuff into my current dir. Am I wrong?
The text was updated successfully, but these errors were encountered: