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
Bloop: 1.3.4 -> 1.4.1 #89359
Bloop: 1.3.4 -> 1.4.1 #89359
Conversation
There is one thing I'm not sure about. For the cli, I link I tried to create a link to both
but it doesn't work :
First few lines of
So it's a wrapper with two additional variables set and some binary code (not sure what it does). It seems that nixpkgs will link only visible files from
It works in the end, but maybe there is a better solution.... This may be relevant, how the Arch package is produced |
are there any updates on this mr? |
So first of all, sorry of letting this wait for so long. I've been aiming to review this for more than a week now. Note that the old way of packaging still work with bloop 1.4.+. Currently, I'm not able to build this. I end up with an exception. (looking into it)
|
Ok so for the problem of AccessDeniedException: /home, adding
The bloop script use a relative path to find .bloop.aux, it does not follow relative link. The AUR package faces the same problem and replace Along the line of following more closely what is done in the AUR package, I have got something along this line. (Note that it does not work yet, it's still a work in progress)
The original proposal needs at least the |
Ok the above seems to works properly. A few small gotcha's:
How do you prefer to proceed with this MR @karolchmist ? I see 3 way of going forward (if you see any other, feel free to suggest):
I'm fine with all options. My preference is with 2 as it limits the number of PR (contrary to 1) and don't make disappear the work you've put into this (contrary to 3). |
Hello @Tomahna, thank you for your version, it's much nicer now 👍 Option 2 seems the best to me as well, so I committed your last suggestion (with modified I rebased on latest For me it's good to merge, if you agree. |
We have a misunderstanding. The outputHash should not change, it actually has to be constant for the derivation to work otherwise other people will not be able to use it properly. I thought that removing the binary part of the coursier script would be sufficient but it appears it is not. The problem seems to be that we cannot patch the binary and the shell script in a fixed output derivation. This makes sense as by patching the binary and the script, we make their output hash dependent of the environment (the version of bash, the version of zlib, etc). And each time the environment change, the outputHash will change. It is something we need to avoid. We can apply the patches in the final derivation, but I guess it would mean we need to copy (instead of just link it) the bloop binary in the final directory. So we would have the binary twice in the nix-store. I don't know if someone more proficient with nix than me sees another way out of it ? |
if of any value, I had an alternative implementation (running it for a while, just made the pr now) : https://github.com/NixOS/nixpkgs/pull/91635/files (closed the pr as found this one :) ) |
anw, the PR here seems good (though haven't tried) - how can we get it merged? :) update: re-read the comment above, I haven't noticed the output hash to change in my version but I'll do more checking :) |
ln -s ${server}/bin/blp-server $out/blp-server | ||
ln -s ${zsh} $out/share/zsh/site-functions/_bloop | ||
# patch the bloop launcher so that it works when symlinked | ||
sed "s|\$(dirname \"\$0\")|$out|" -i $out/bloop |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nitpicking/optional: this keeps the $(cd "$out" ; pwd)
part, and could be replaced wider I'd think... in my version I had #\$(cd "\$(dirname "\$0")"; pwd)/.bloop.aux#'"$out"'/bin/.bloop.aux#
I don't see a better approach than this suggestion (yes it's 40MB less on my disk but hey, when I run nix-gc I get 100GB back!), in fact, the final patching I'd say is not build, but |
Superseded by #91758, closing. |
Motivation for this change
Update bloop to the latest version
Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)cc maintainer @Tomahna