Skip to content
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

texlive: add missing perl dependencies for latexindent #59537

Merged
merged 1 commit into from May 2, 2019

Conversation

veprbl
Copy link
Member

@veprbl veprbl commented Apr 14, 2019

Motivation for this change

Resolves: #35537
Improves on previous version #54518

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nix-review --run "nix-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Assured whether relevant documentation is up to date
  • Fits CONTRIBUTING.md.

cc @volth @romildo
cc #55933

@GrahamcOfBorg GrahamcOfBorg added 6.topic: TeX Issues regarding texlive and TeX in general 10.rebuild-darwin: 0 10.rebuild-linux: 1-10 labels Apr 15, 2019
@veprbl veprbl force-pushed the pr/texlive_latexindent_deps branch from 4867206 to dbc2c1c Compare April 15, 2019 15:30
@veprbl
Copy link
Member Author

veprbl commented Apr 15, 2019

Forgot to mention. This was tested by running:

nix-shell -p "texlive.combine { inherit (texlive) scheme-minimal latexindent; }" \
  --pure --run latexindent

@veprbl veprbl merged commit 7eeab37 into NixOS:master May 2, 2019
veprbl added a commit that referenced this pull request May 3, 2019
veprbl added a commit that referenced this pull request May 3, 2019
@veprbl veprbl added the 8.has: port to stable A PR already has a backport to the stable release. label May 3, 2019
@dtzWill
Copy link
Member

dtzWill commented May 10, 2019

Is it indeed needed / useful for this to have the perl deps propagated here? I'm tracking down recent regression that caused shebang length to explode and looking for possible causes, is why I'm asking :).

@veprbl
Copy link
Member Author

veprbl commented May 10, 2019

@dtzWill Yes, it is needed. When doing the original #54518 I initially tried to add things manually, but there were too many needed "higher order" dependencies, so I had to go for lib.closePropagation there.

@dtzWill
Copy link
Member

dtzWill commented May 11, 2019 via email

@veprbl
Copy link
Member Author

veprbl commented May 11, 2019

+1 for only propagating them reluctantly when other efforts were insufficient :)

Actually the reason for adding dependencies manually was because the use of lib.closePropagation is discouraged for some reason. I'm not knowledgeable about Perl, but all imports there seemed unconditional, so I did not expect to be able to cut down any dependencies that way. If that was possible, then those should have been fixed in the relevant perl packages instead. Also, setting dependencies manually is not very maintainable.

Judging from conclusions of #55786 your workaround appears to be an actual canonical solution. Perhaps we should merge it to fix "latexindent" on macOS.

@veprbl
Copy link
Member Author

veprbl commented May 13, 2019

For some reason applying 986fcbc doesn't fix the issue, I still get the same error on macOS:

# nix-shell -p "texlive.combine { inherit (texlive) scheme-minimal latexindent; }" --pure --run latexindent
/nix/store/3xz409mpls1cm5yg768zwcwdnkhbx27h-perl5.28.2-texlive-latexindent-3.5.3/bin/latexindent: line 20: use: command not found
/nix/store/3xz409mpls1cm5yg768zwcwdnkhbx27h-perl5.28.2-texlive-latexindent-3.5.3/bin/latexindent: line 21: use: command not found
/nix/store/3xz409mpls1cm5yg768zwcwdnkhbx27h-perl5.28.2-texlive-latexindent-3.5.3/bin/latexindent: line 22: use: command not found
/nix/store/3xz409mpls1cm5yg768zwcwdnkhbx27h-perl5.28.2-texlive-latexindent-3.5.3/bin/latexindent: line 23: use: command not found
/nix/store/3xz409mpls1cm5yg768zwcwdnkhbx27h-perl5.28.2-texlive-latexindent-3.5.3/bin/latexindent: line 26: use: command not found
/nix/store/3xz409mpls1cm5yg768zwcwdnkhbx27h-perl5.28.2-texlive-latexindent-3.5.3/bin/latexindent: line 27: use: command not found
/nix/store/3xz409mpls1cm5yg768zwcwdnkhbx27h-perl5.28.2-texlive-latexindent-3.5.3/bin/latexindent: line 30: syntax error near unexpected token `('
/nix/store/3xz409mpls1cm5yg768zwcwdnkhbx27h-perl5.28.2-texlive-latexindent-3.5.3/bin/latexindent: line 30: `my %switches = (readLocalSettings=>0);'

Even though the shebang is much shorter now:

# head /nix/store/3xz409mpls1cm5yg768zwcwdnkhbx27h-perl5.28.2-texlive-latexindent-3.5.3/bin/latexindent
#!/nix/store/vk301av7nr86gpql9hpxcw4j9nbr9vms-perl-5.28.2-env/bin/perl -I/nix/store/65h67v6ilwvjp8xqrr73q0yhw4rdhpaa-perl-5.28.2/lib/perl5/site_perl -I/nix/store/vk301av7nr86gpql9hpxcw4j9nbr9vms-perl-5.28.2-env/lib/perl5/site_perl -I/nix/store/65h67v6ilwvjp8xqrr73q0yhw4rdhpaa-perl-5.28.2/lib/perl5/site_perl -I/nix/store/vk301av7nr86gpql9hpxcw4j9nbr9vms-perl-5.28.2-env/lib/perl5/site_perl -I/nix/store/65h67v6ilwvjp8xqrr73q0yhw4rdhpaa-perl-5.28.2/lib/perl5/site_perl -I/nix/store/vk301av7nr86gpql9hpxcw4j9nbr9vms-perl-5.28.2-env/lib/perl5/site_perl -I/nix/store/3xz409mpls1cm5yg768zwcwdnkhbx27h-perl5.28.2-texlive-latexindent-3.5.3/lib/perl5/site_perl
#   latexindent.pl, version 3.5.3, 2018-10-13
#
#       This program is free software: you can redistribute it and/or modify
#       it under the terms of the GNU General Public License as published by
#       the Free Software Foundation, either version 3 of the License, or
#       (at your option) any later version.
#
#       This program is distributed in the hope that it will be useful,
#       but WITHOUT ANY WARRANTY; without even the implied warranty of

@veprbl veprbl deleted the pr/texlive_latexindent_deps branch December 1, 2020 16:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.topic: TeX Issues regarding texlive and TeX in general 8.has: port to stable A PR already has a backport to the stable release. 10.rebuild-darwin: 0 10.rebuild-linux: 1-10
Projects
None yet
Development

Successfully merging this pull request may close these issues.

latexindent broken due to missing perl modules
3 participants