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

pygmentex: add tlType attribute; install latex style and demo #56063

Merged
merged 1 commit into from Feb 27, 2019
Merged

pygmentex: add tlType attribute; install latex style and demo #56063

merged 1 commit into from Feb 27, 2019

Conversation

romildo
Copy link
Contributor

@romildo romildo commented Feb 19, 2019

Motivation for this change
  • Install LaTeX style file and example document.
  • Set pname and tlType attributes, so that it can be used with texlive.combine. For instance one can put the following in environment.systemPackages:
( texlive.combine {
     pygmentex = { pkgs = [pygmentex]; };
     inherit (texlive) scheme-basic;
} )
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 nox --run "nox-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.

@veprbl
Copy link
Member

veprbl commented Feb 19, 2019

This doesn't seem to work for me. I'm trying to do

nix-shell -I nixpkgs=`pwd`/nixpkgs --pure \
  -p 'texlive.combine { pygmentex = { pkgs = [pygmentex]; }; inherit (texlive) scheme-basic; }' \
  -p which \
  --run "which pygmentex; which pygmentex.py"

Perhaps you need to set tlType = "bin" for this or put pygmentex.py into "$out/scripts/pygmentex/" like it is in builtins.elemAt texlive.pygmentex.pkgs 0.

@romildo
Copy link
Contributor Author

romildo commented Feb 20, 2019

This doesn't seem to work for me. I'm trying to do

nix-shell -I nixpkgs=`pwd`/nixpkgs --pure \
  -p 'texlive.combine { pygmentex = { pkgs = [pygmentex]; }; inherit (texlive) scheme-basic; }' \
  -p which \
  --run "which pygmentex; which pygmentex.py"

It works for me when I add -p pygmentex to that command line.

In other words the script is not being put into the bin dir of the texlive combined output, but it is put into share/texmf/bin, which seems not be searched for executable files.

The style file pygmentex.sty is ok.

That is bad because I have to mention pygmentex twice.

@romildo
Copy link
Contributor Author

romildo commented Feb 20, 2019

Perhaps you need to set tlType = "bin" for this

With tlType = "bin" the script is installed into the bin dir of the texlive combined output, fixing the issue.

But in this case the style file pygmentex.sty and the documentation are not installed into the texlive combined output (why?), which is a big issue.

@romildo
Copy link
Contributor Author

romildo commented Feb 20, 2019

Perhaps you need to [...] put pygmentex.py into $out/scripts/pygmentex/ like it is in builtins.elemAt texlive.pygmentex.pkgs 0.

With this change the script is installed into the bin dir of the texlive combined output. But it is not automatically wrapped by nixpkgs python machinery.

I am going to keep the script in $out/bin and making a symbolic link to it into $out/scripts/pygmentex/. This seems to work.

@romildo
Copy link
Contributor Author

romildo commented Feb 22, 2019

@veprbl Do you know how to remove pygmentex distributed with texlive from scheme-full?

@veprbl
Copy link
Member

veprbl commented Feb 22, 2019

@romildo I've been thinking about not just removing but replacing it. I have not come around to investigate that yet.

Copy link
Member

@veprbl veprbl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is good to go. The only thing is that this is still conflicts with, for example, texlive.combined.scheme-full. What is more convenient for you, for this merged now, or later, after we fix that issue?

@romildo
Copy link
Contributor Author

romildo commented Feb 27, 2019

It can be merged now.

@veprbl veprbl merged commit 83f1256 into NixOS:master Feb 27, 2019
@romildo romildo deleted the fix.pygmentex branch February 27, 2019 18:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants