mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-09-29 07:32:58 +00:00
texlive.combine: include packages with man pages by default
This commit is contained in:
parent
56af1c1981
commit
01af940407
@ -22,7 +22,7 @@ Since release 15.09 there is a new TeX Live packaging that lives entirely under
|
||||
texlive.combine {
|
||||
# inherit (texlive) whatever-you-want;
|
||||
pkgFilter = pkg:
|
||||
pkg.tlType == "run" || pkg.tlType == "bin" || pkg.pname == "cm-super";
|
||||
pkg.tlType == "run" || pkg.tlType == "bin" || pkg.hasManpages || pkg.pname == "cm-super";
|
||||
# elem tlType [ "run" "bin" "doc" "source" ]
|
||||
# there are also other attributes: version, name
|
||||
}
|
||||
|
@ -1,7 +1,8 @@
|
||||
params: with params;
|
||||
# combine =
|
||||
args@{
|
||||
pkgFilter ? (pkg: pkg.tlType == "run" || pkg.tlType == "bin" || pkg.pname == "core")
|
||||
pkgFilter ? (pkg: pkg.tlType == "run" || pkg.tlType == "bin" || pkg.pname == "core"
|
||||
|| pkg.hasManpages or false)
|
||||
, extraName ? "combined"
|
||||
, extraVersion ? ""
|
||||
, ...
|
||||
|
@ -418,6 +418,8 @@ let
|
||||
pkg = attrs // {
|
||||
sha512 = attrs.sha512.${if tlType == "tlpkg" then "run" else tlType};
|
||||
inherit pname tlType version;
|
||||
} // lib.optionalAttrs (attrs.hasManpages or false) {
|
||||
hasManpages = true;
|
||||
};
|
||||
in mkPkg pkg;
|
||||
run = if (attrs.hasRunfiles or false) then mkPkgV "run"
|
||||
@ -531,7 +533,7 @@ let
|
||||
'';
|
||||
|
||||
# create a derivation that contains an unpacked upstream TL package
|
||||
mkPkg = { pname, tlType, revision, version, sha512, extraRevision ? "", postUnpack ? "", stripPrefix ? 1, ... }@args:
|
||||
mkPkg = { pname, tlType, revision, version, sha512, extraRevision ? "", postUnpack ? "", stripPrefix ? 1, hasManpages ? false, ... }@args:
|
||||
let
|
||||
# the basename used by upstream (without ".tar.xz" suffix)
|
||||
urlName = mkURLName args;
|
||||
@ -557,7 +559,9 @@ let
|
||||
hasHyphens = args.hasHyphens or false;
|
||||
} // lib.optionalAttrs (tlType == "tlpkg" && args ? postactionScript) {
|
||||
postactionScript = args.postactionScript;
|
||||
} // lib.optionalAttrs (tlType == "run" && args ? formats) { inherit (args) formats; };
|
||||
}
|
||||
// lib.optionalAttrs (tlType == "run" && args ? formats) { inherit (args) formats; }
|
||||
// lib.optionalAttrs (tlType == "doc" && hasManpages) { hasManpages = true; };
|
||||
} // lib.optionalAttrs (fixedHash != null) {
|
||||
outputHash = fixedHash;
|
||||
outputHashAlgo = "sha256";
|
||||
|
@ -81,6 +81,20 @@ $a}
|
||||
}
|
||||
|
||||
# detect presence of notable files
|
||||
/^docfiles /{
|
||||
s/^.*$// # ignore the first line
|
||||
|
||||
# read all files
|
||||
:next-doc
|
||||
N
|
||||
s/\n / / # remove newline
|
||||
t next-doc # loop if the previous lines matched
|
||||
|
||||
/ (texmf-dist|RELOC)\/doc\/man\//i\ hasManpages = true;
|
||||
|
||||
D # restart cycle
|
||||
}
|
||||
|
||||
/^runfiles /{
|
||||
s/^.*$// # ignore the first line
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user