texlivePackages: add homepage (#321744)

This commit is contained in:
Vincenzo Mantova
2024-12-02 14:52:49 -05:00
committed by GitHub
parent 6ff1f11bfd
commit 63a869db05
3 changed files with 241 additions and 33 deletions
@@ -50,6 +50,8 @@
, hasManpages ? false
, hasRunfiles ? false
, hasTlpkg ? false
, hasCatalogue ? true
, catalogue ? pname
, extraNativeBuildInputs ? [ ]
, ...
}@args:
@@ -73,6 +75,8 @@ let
hydraPlatforms = [ ];
} // lib.optionalAttrs (args ? shortdesc) {
description = args.shortdesc;
} // lib.optionalAttrs hasCatalogue {
homepage = "https://ctan.org/pkg/${catalogue}";
};
hasBinfiles = args ? binfiles && args.binfiles != [ ];
+69 -33
View File
@@ -37,40 +37,58 @@ $a}
# number of path components to strip, defaulting to 1 ("texmf-dist/")
/^relocated 1/i\ stripPrefix = 0;
# extract version and clean unwanted chars from it
/^catalogue-version/y/ \/~/_--/
/^catalogue-version/s/[\#,:\(\)]//g
s/^catalogue-version_(.*)/ version = "\1";/p
/^catalogue(-| )/{
:next-cat
/^catalogue-license/{
# wrap licenses in quotes
s/ ([^ ]+)/ "\1"/g
# adjust naming as in nixpkgs, the full texts of the licenses are available at https://www.ctan.org/license/${licenseName}
s/"(cc-by(-sa)?-[1-4])"/"\10"/g
s/"apache2"/"asl20"/g
s/"artistic"/"artistic1-cl8"/g
s/"bsd"/"bsd3"/g # license text does not match exactly, but is pretty close
s/"bsd4"/"bsdOriginal"/g
s/"collection"/"free"/g # used for collections of individual packages with distinct licenses. As TeXlive only contains free software, we can use "free" as a catchall
s/"eupl"/"eupl12"/g
s/"fdl"/"fdl13Only"/g
s/"gpl"/"gpl1Only"/g
s/"gpl([1-3])"/"gpl\1Only"/g
s/"gpl2\+"/"gpl2Plus"/g
s/"gpl3\+"/"gpl3Plus"/g
s/"lgpl"/"lgpl2"/g
s/"lgpl2\.1"/"lgpl21"/g
s/"lppl"/"lppl13c"/g # not used consistently, sometimes "lppl" refers to an older version of the license
s/"lppl1\.2"/"lppl12"/g
s/"lppl1\.3"/"lppl13c"/g # If a work refers to LPPL 1.3 as its license, this is interpreted as the latest version of the 1.3 license (https://www.latex-project.org/lppl/)
s/"lppl1\.3a"/"lppl13a"/g
s/"lppl1\.3c"/"lppl13c"/g
s/"other-free"/"free"/g
s/"other-nonfree"/"unfree"/g
s/"opl"/"opubl"/g
s/"pd"/"publicDomain"/g
s/^catalogue (.*)/ catalogue = "\1";/p
s/^catalogue-license (.*)/ license = [ \1 ];/p
# extract version and clean unwanted chars from it
/^catalogue-version/y/ \/~/_--/
/^catalogue-version/s/[\#,:\(\)]//g
s/^catalogue-version_(.*)/ version = "\1";/p
# extract license
/^catalogue-license/{
# wrap licenses in quotes
s/ ([^ ]+)/ "\1"/g
# adjust naming as in nixpkgs, the full texts of the licenses are available at https://www.ctan.org/license/${licenseName}
s/"(cc-by(-sa)?-[1-4])"/"\10"/g
s/"apache2"/"asl20"/g
s/"artistic"/"artistic1-cl8"/g
s/"bsd"/"bsd3"/g # license text does not match exactly, but is pretty close
s/"bsd4"/"bsdOriginal"/g
s/"collection"/"free"/g # used for collections of individual packages with distinct licenses. As TeXlive only contains free software, we can use "free" as a catchall
s/"eupl"/"eupl12"/g
s/"fdl"/"fdl13Only"/g
s/"gpl"/"gpl1Only"/g
s/"gpl([1-3])"/"gpl\1Only"/g
s/"gpl2\+"/"gpl2Plus"/g
s/"gpl3\+"/"gpl3Plus"/g
s/"lgpl"/"lgpl2"/g
s/"lgpl2\.1"/"lgpl21"/g
s/"lppl"/"lppl13c"/g # not used consistently, sometimes "lppl" refers to an older version of the license
s/"lppl1\.2"/"lppl12"/g
s/"lppl1\.3"/"lppl13c"/g # If a work refers to LPPL 1.3 as its license, this is interpreted as the latest version of the 1.3 license (https://www.latex-project.org/lppl/)
s/"lppl1\.3a"/"lppl13a"/g
s/"lppl1\.3c"/"lppl13c"/g
s/"other-free"/"free"/g
s/"other-nonfree"/"unfree"/g
s/"opl"/"opubl"/g
s/"pd"/"publicDomain"/g
s/^catalogue-license (.*)/ license = [ \1 ];/p
}
s/^.*$//
N
s/^\ncatalogue(-| )/catalogue\1/
t next-cat
# flag existence of catalogue info in hold space
x ; s/$/\n hasCatalogue = true;/ ; x
# restart cycle
D
}
# extract deps
@@ -221,7 +239,25 @@ $a}
}
# close attrmap
/^$/i};
/^$/{
# process content of hold space
x
# change hasCatalogue default from false to true
s/^ hasCatalogue = true;$//Mg
t had-catalogue
s/(\n?)$/\1 hasCatalogue = false;/
:had-catalogue
# print hold space if not empty
/./Mp
# erase hold space
s/.*//
x
i};
}
}
# add list of binaries from one of the architecture-specific packages
File diff suppressed because it is too large Load Diff