Use packagesFromDirectoryRecursive to improve package building

This commit is contained in:
ulic-youthlic 2025-07-12 23:57:53 +08:00
parent 57dafbe7e1
commit 8aa578123c
Signed by: youthlic
GPG key ID: 63E86C3C14A0D721
10 changed files with 27 additions and 33 deletions

View file

@ -0,0 +1,19 @@
{
nixosTests,
srcs,
stdenvNoCC,
}: let
source = srcs.noto-sans-cjk;
in
stdenvNoCC.mkDerivation (_finalAttrs: {
pname = "noto-sans-cjk";
version = source.version;
src = source.src;
installPhase = ''
install -m444 -Dt $out/share/fonts/opentype/noto-sans-cjk Sans/OTC/*.ttc
'';
passthru.tests.noto-fonts = nixosTests.noto-fonts;
})

View file

@ -0,0 +1,19 @@
{
nixosTests,
srcs,
stdenvNoCC,
}: let
source = srcs.noto-serif-cjk;
in
stdenvNoCC.mkDerivation (_finalAttrs: {
pname = "noto-serif-cjk";
version = source.version;
src = source.src;
installPhase = ''
install -m444 -Dt $out/share/fonts/opentype/noto-serif-cjk Serif/OTC/*.ttc
'';
passthru.tests.noto-fonts = nixosTests.noto-fonts;
})