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

pythonPackages.sphinxcontrib-tikz: init at 0.4.6 #57583

Merged
merged 1 commit into from Jan 5, 2020

Conversation

@costrouc
Copy link
Contributor

@costrouc costrouc commented Mar 13, 2019

Limited texlive package to minimal packages schema-small + standalone + pgfplots

Motivation for this change

I want tikz for my documentation (nothing beats tikz in editable graphics :) )

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.

@costrouc costrouc requested a review from FRidh as a code owner Mar 13, 2019
@costrouc
Copy link
Contributor Author

@costrouc costrouc commented Mar 13, 2019

I have verified that this works locally with my documentation.

@costrouc
Copy link
Contributor Author

@costrouc costrouc commented Mar 13, 2019

@GrahamcOfBorg build python2Packages.sphinxcontrib-tikz python3Packages.sphinxcontrib-tikz

@@ -4556,6 +4556,10 @@ in {

sphinxcontrib-spelling = callPackage ../development/python-modules/sphinxcontrib-spelling { };

sphinxcontrib-tikz = callPackage ../development/python-modules/sphinxcontrib-tikz {
texLive = pkgs.texlive.combine { inherit (pkgs.texlive) scheme-small standalone pgfplots; };

This comment has been minimized.

@dotlambda

dotlambda Mar 14, 2019
Member

Suggested change
texLive = pkgs.texlive.combine { inherit (pkgs.texlive) scheme-small standalone pgfplots; };
texlive = pkgs.texlive.combine { inherit (pkgs.texlive) scheme-small standalone pgfplots; };
sha256 = "4f362b11e3c2bd17d5f0f07fec03917c16fc5bbcda6fe31ee137c547ed6b03a3";
};

propagatedBuildInputs = [ sphinx pdf2svg texLive ];

This comment has been minimized.

@dotlambda

dotlambda Mar 14, 2019
Member

TeXLive should not be propagated.

This comment has been minimized.

@dotlambda

dotlambda Mar 14, 2019
Member

...as well as pdf2svg

This comment has been minimized.

@costrouc

costrouc Mar 14, 2019
Author Contributor

This package will not work without pdf2svg and texlive. Curious how in general this is handled? I realize that both of those package have a lot of dependencies.

This comment has been minimized.

@dotlambda

dotlambda Mar 14, 2019
Member

Both of these aren't Python packages and should hence not be propagated. Instead, their path should be patched into the source using substituteAll.

This comment has been minimized.

@costrouc

costrouc Mar 14, 2019
Author Contributor

Is there an example of that? I've never seen it used. Like so?

This comment has been minimized.

@dotlambda

dotlambda Mar 14, 2019
Member

Exactly 👍

@veprbl veprbl changed the title pythonPackages.sphinxcontrib-tikz: init at 0.4.6 [WIP] pythonPackages.sphinxcontrib-tikz: init at 0.4.6 Mar 22, 2019
@costrouc costrouc changed the title [WIP] pythonPackages.sphinxcontrib-tikz: init at 0.4.6 pythonPackages.sphinxcontrib-tikz: init at 0.4.6 Apr 14, 2019
@costrouc
Copy link
Contributor Author

@costrouc costrouc commented Apr 14, 2019

@dotlambda I am not completely sure how to write the patch to include texlive. That is why I have not finished this PR.

@dotlambda
Copy link
Member

@dotlambda dotlambda commented Apr 15, 2019

You get a checkout of the source code and look for all places where a texlive binary is called, let's say the code is Popen('pdflatex'). You replace this by Popen('@texlive@/bin/pdflatex'). Then you save the diff as e.g. binary-paths.patch and add

patches = [
  (substituteAll {
    src = ./binary-paths.patch;
    inherit texlive pdf2svg;
  })
];
@costrouc costrouc force-pushed the costrouc:python-init-sphinxcontrib-tikz branch from 14775a0 to 4baba66 Jul 23, 2019
requires texlive.combined.scheme-full due to needing "standalone.cls"
from extras.
@costrouc costrouc force-pushed the costrouc:python-init-sphinxcontrib-tikz branch from 4baba66 to be4f844 Jul 23, 2019
@costrouc
Copy link
Contributor Author

@costrouc costrouc commented Jul 23, 2019

@GrahamcOfBorg build python2Packages.sphinxcontrib-tikz python3Packages.sphinxcontrib-tikz

@costrouc
Copy link
Contributor Author

@costrouc costrouc commented Jul 23, 2019

@dotlambda I have created the patch (that was fun to figure out how to do with git). I have checked that documentation that uses this package works properly. Ready for merge

@costrouc
Copy link
Contributor Author

@costrouc costrouc commented Jul 26, 2019

Ping ready for merge

@ryantm
ryantm approved these changes Jan 5, 2020
@ryantm ryantm merged commit 2e8fc97 into NixOS:master Jan 5, 2020
15 checks passed
15 checks passed
Evaluation Performance Report Evaluator Performance Report
Details
grahamcofborg-eval ^.^!
Details
grahamcofborg-eval-check-maintainers matching changed paths to changed attrs...
Details
grahamcofborg-eval-check-meta config.nix: checkMeta = true
Details
grahamcofborg-eval-darwin nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./pkgs/top-level/release.nix -A darwin-tested
Details
grahamcofborg-eval-nixos nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./nixos/release-combined.nix -A tested
Details
grahamcofborg-eval-nixos-manual nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./nixos/release.nix -A manual
Details
grahamcofborg-eval-nixos-options nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./nixos/release.nix -A options
Details
grahamcofborg-eval-nixpkgs-manual nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./pkgs/top-level/release.nix -A manual
Details
grahamcofborg-eval-nixpkgs-tarball nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./pkgs/top-level/release.nix -A tarball
Details
grahamcofborg-eval-nixpkgs-unstable-jobset nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./pkgs/top-level/release.nix -A unstable
Details
grahamcofborg-eval-package-list nix-env -qa --json --file .
Details
grahamcofborg-eval-package-list-no-aliases nix-env -qa --json --file . --arg config { allowAliases = false; }
Details
python2Packages.sphinxcontrib-tikz, python3Packages.sphinxcontrib-tikz on aarch64-linux Success
Details
python2Packages.sphinxcontrib-tikz, python3Packages.sphinxcontrib-tikz on x86_64-linux Success
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

4 participants
You can’t perform that action at this time.