···3839- Note that the wrapper assumes that the result has a chance to be useful. For example, the core executables should be present, as well as some core data files. The supported way of ensuring this is by including some scheme, for example `scheme-basic`, into the combination.
4000000000000000000041## Custom packages {#sec-language-texlive-custom-packages}
4243You 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`.
···3839- Note that the wrapper assumes that the result has a chance to be useful. For example, the core executables should be present, as well as some core data files. The supported way of ensuring this is by including some scheme, for example `scheme-basic`, into the combination.
4041+- TeX Live packages are also available under `texlive.pkgs` as derivations with outputs `out`, `tex`, `texdoc`, `texsource`, `tlpkg`, `man`, `info`. They cannot be installed outside of `texlive.combine` but are available for other uses. To repackage a font, for instance, use
42+43+ ```nix
44+ stdenvNoCC.mkDerivation rec {
45+ src = texlive.pkgs.iwona;
46+47+ inherit (src) pname version;
48+49+ installPhase = ''
50+ runHook preInstall
51+ install -Dm644 fonts/opentype/nowacki/iwona/*.otf -t $out/share/fonts/opentype
52+ runHook postInstall
53+ '';
54+ }
55+ ```
56+57+ See `biber`, `iwona` for complete examples.
58+59## Custom packages {#sec-language-texlive-custom-packages}
6061You 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`.
+4-5
pkgs/data/fonts/iwona/default.nix
···1{ lib, stdenvNoCC, texlive }:
23-stdenvNoCC.mkDerivation {
4- pname = "iwona";
5- version = "0.995b";
67- src = lib.head (builtins.filter (p: p.tlType == "run") texlive.iwona.pkgs);
89 installPhase = ''
10 runHook preInstall
···20 # "[...] GUST Font License (GFL), which is a free license, legally
21 # equivalent to the LaTeX Project Public # License (LPPL), version 1.3c or
22 # later." - GUST website
23- license = licenses.lppl13c;
24 maintainers = with maintainers; [ siddharthist ];
25 platforms = platforms.all;
26 };
···1{ lib, stdenvNoCC, texlive }:
23+stdenvNoCC.mkDerivation rec {
4+ inherit (src) pname version;
056+ src = texlive.pkgs.iwona;
78 installPhase = ''
9 runHook preInstall
···19 # "[...] GUST Font License (GFL), which is a free license, legally
20 # equivalent to the LaTeX Project Public # License (LPPL), version 1.3c or
21 # later." - GUST website
22+ license = src.meta.license;
23 maintainers = with maintainers; [ siddharthist ];
24 platforms = platforms.all;
25 };
···4344 # experimental texlive.combine support
45 # (note that only the bin/ folder will be combined into texlive)
46- passthru = {
47- tlType = "bin";
48- tlDeps = with texlive; [ kpathsea t1utils metafont ];
49- pkgs = [ finalAttrs.finalPackage ];
50- };
5152 meta = with lib; {
53 description = "Scalable PostScript Fonts for MetaFont";
···4344 # experimental texlive.combine support
45 # (note that only the bin/ folder will be combined into texlive)
46+ passthru.tlDeps = with texlive; [ kpathsea t1utils metafont ];
00004748 meta = with lib; {
49 description = "Scalable PostScript Fonts for MetaFont";