@@ -31,11 +31,29 @@ let
3131 };
3232in
3333{
34− sans = makePackage {
34+ sans = let
35+ rev = "2.004R";
3536 family = "sans";
36− description = "sans-serif";
37− rev = "2.001R";
38− sha256 = "101p8q0sagf1sd1yzwdrmmxvkqq7j0b8hi0ywsfck9w56r4zx54y";
37+ Family = "Sans";
38+ zip = fetchzip {
39+ url = "https://github.com/adobe-fonts/source-han-${family}/releases/download/${rev}/SourceHan${Family}.ttc.zip";
40+ stripRoot = false;
41+ sha256 = "0z852kzb84vqk57icfaxbfxhf43awcn8w39byfypxaxigzhy78l7";
42+ };
43+ in stdenvNoCC.mkDerivation {
44+ pname = "source-han-sans";
45+ version = lib.removeSuffix "R" rev;
46+
47+ buildCommand = ''
48+ install -m444 -Dt $out/share/fonts/opentype/source-han-sans ${zip}/SourceHanSans.ttc
49+ '';
50+
51+ meta = {
52+ description = "An open source Pan-CJK sans-serif typeface";
53+ homepage = "https://github.com/adobe-fonts/source-han-${family}";
54+ license = lib.licenses.ofl;
55+ maintainers = with lib.maintainers; [ taku0 emily ];
56+ };
3957 };
4058
4159 serif = makePackage {