-
-
Notifications
You must be signed in to change notification settings - Fork 14.1k
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
Updated fix for Perl programs on Darwin #66446
Updated fix for Perl programs on Darwin #66446
Conversation
I don’t think it’s just a matter of patching, though. On my system the shebang line for the (The shebang line for exiftool contains a lot of redundant |
Builds ok for me macos 10.13 FWIW |
Although the build works, the same error is present - the error is now just in the resulting |
@volth I still don’t understand why creating an ad-hoc solution for each different program is preferable to creating a single wrapper that can be invoked when needed. Is there some concern with the closure size? |
@gpampara Are you having that issue with the code from the PR, or one of the versions from the comments here? The PR version of Biber works for me on macOS 10.13, at least to the extent that
|
@volth It seems like ack has the same problem on Darwin too—see #47302—and this comment implies that the youtube-viewer package is affected as well. There doesn’t seem to be a ticket for youtube-viewer but I went ahead and updated this PR to include a fix for ack too. I’m not opposed to taking the ad-hoc approach if it really is only two packages that are affected, but if every Perl-based program has the potential to trigger this problem on Darwin then it seems like the fix should be part of the Nix Perl infrastructure, not something for each program to solve on its own. I understand that you don’t want to include a near-duplicate wrapper if it’s not necessary, but isn’t it going to be more total lines of code to fix the same problem in every single affected package? |
@bdesham the patch listings from the comments. I was hoping that they would provide a quick solution, but I'll apply your patches on a pinned version of nixpkgs locally :) |
That seems reasonable to me. Just to be clear, you’re okay with adding a |
I guess creating a new builder for Darwin would prevent a whole bunch of rebuilding on other platforms. |
OK, I’ll work on a new Bash script we can call for these kinds of programs. |
9d2b8c9
to
162032b
Compare
I rewrote this PR to introduce a shell function called
|
6deaed0
to
6f2bd80
Compare
I’ve made the additional improvements I mentioned, so this should be good to go. |
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.
How was this tested? I get a following problem:
[nix-shell:~/.cache/nix-review/pr-66446]$ cd nixpkgs
[nix-shell:~/.cache/nix-review/pr-66446/nixpkgs]$ NIX_PATH=nixpkgs=`pwd` nix-shell -p biber --pure --run biber
/private/var/folders/1f/2mj_ng1n2y3_wc59fgw3fn_r0000gn/T/nix-shell-18812-0/rc: line 1: /nix/store/2rdg8x1vbrk839kngcbffchnm9847h7m-perl5.28.2-biber-2.12/bin/biber: Permission denied
[nix-shell:~/.cache/nix-review/pr-66446/nixpkgs]$ ls -la /nix/store/2rdg8x1vbrk839kngcbffchnm9847h7m-perl5.28.2-biber-2.12/bin/biber
-r--r--r-- 1 user wheel 41877 Dec 31 1969 /nix/store/2rdg8x1vbrk839kngcbffchnm9847h7m-perl5.28.2-biber-2.12/bin/biber
Seems like mv inherits permissions from the temp file.
This could be also useful for latexindent: #59537 (comment) |
43de9f7
to
347064b
Compare
@veprbl I did test the execution of the scripts at some point, but apparently I made other changes in the meantime that broke the files’ modes. Sorry about that! The issue should be fixed now. |
Also should use |
This setup hook modifies a Perl script so that any "-I" flags in its shebang line are rewritten into a "use lib ..." statement on the next line. This gets around a limitation in Darwin, which will not properly handle a script whose shebang line exceeds 511 characters.
Also remove gnused from the buildInputs: it's already provided to us in this stage. Closes NixOS#47302.
347064b
to
8036b0f
Compare
Motivation for this change
Fix biber (#35353) and exiftool (#63111) on Darwin.
This PR is just an updated version of PR #35477 by @boronine. That PR has merge conflicts now; this one fixes the conflicts. (@boronine: if you would rather pull these changes into your branch and rebase, please feel free to do so! I don’t want to seem as if I’m trying to take credit for your work.)
Things done
sandbox
innix.conf
on non-NixOS)nix-shell -p nix-review --run "nix-review wip"
./result/bin/
)nix path-info -S
before and after)--
Resolves: #35353 #35477 #47302 #62156 #63111