diff options
author | Dmitry Kalinkin <dmitry.kalinkin@gmail.com> | 2023-04-09 23:59:45 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-09 23:59:45 -0400 |
commit | df3bf8ff76fc4c010ba4d1f5161e2c1020aaa4c3 (patch) | |
tree | 849260eb93d22679420c5e5813722a26e7115f9e /doc/languages-frameworks | |
parent | 83ca2cd74539fb8e79d46e233f6bb1d978c36f32 (diff) | |
parent | 35b698d0b2194038d0a2f279347053e5a10ea1fb (diff) |
Merge pull request #218331 from xworld21/texlive-new-dependency-resolution
texlive.combine: move dependencies to attribute tlDeps, resolve them …
Diffstat (limited to 'doc/languages-frameworks')
-rw-r--r-- | doc/languages-frameworks/texlive.section.md | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/doc/languages-frameworks/texlive.section.md b/doc/languages-frameworks/texlive.section.md index e790e217cac0d..72ab14126bedc 100644 --- a/doc/languages-frameworks/texlive.section.md +++ b/doc/languages-frameworks/texlive.section.md @@ -40,17 +40,24 @@ Since release 15.09 there is a new TeX Live packaging that lives entirely under ## Custom packages {#sec-language-texlive-custom-packages} +You may find that you need to use an external TeX package. A derivation for such package has to provide the contents of the "texmf" directory in its output and provide the appropriate `tlType` attribute (one of `"run"`, `"bin"`, `"doc"`, `"source"`). Dependencies on other TeX packages can be listed in the attribute `tlDeps`. -You may find that you need to use an external TeX package. A derivation for such package has to provide contents of the "texmf" directory in its output and provide the `tlType` attribute. Here is a (very verbose) example: +Such derivation must then be listed in the attribute `pkgs` of an attribute set passed to `texlive.combine`, for instance by passing `extraPkgs = { pkgs = [ custom_package ]; };`. Within Nixpkgs, `pkgs` should be part of the derivation itself, allowing users to call `texlive.combine { inherit (texlive) scheme-small; inherit some_tex_package; }`. + +Here is a (very verbose) example where the attribute `pkgs` is attached to the derivation itself, which requires creating a fixed point. See also the packages `auctex`, `eukleides`, `mftrace` for more examples. ```nix with import <nixpkgs> {}; let - foiltex_run = stdenvNoCC.mkDerivation { + foiltex = stdenvNoCC.mkDerivation (finalAttrs: { pname = "latex-foiltex"; version = "2.1.4b"; - passthru.tlType = "run"; + passthru = { + pkgs = [ finalAttrs.finalPackage ]; + tlDeps = with texlive; [ latex ]; + tlType = "run"; + }; srcs = [ (fetchurl { @@ -102,8 +109,7 @@ let maintainers = with maintainers; [ veprbl ]; platforms = platforms.all; }; - }; - foiltex = { pkgs = [ foiltex_run ]; }; + }); latex_with_foiltex = texlive.combine { inherit (texlive) scheme-small; |