lora: use installFonts hook
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
stdenvNoCC,
|
||||
fetchFromGitHub,
|
||||
nix-update-script,
|
||||
installFonts,
|
||||
}:
|
||||
|
||||
stdenvNoCC.mkDerivation (finalAttrs: {
|
||||
@@ -21,13 +22,12 @@ stdenvNoCC.mkDerivation (finalAttrs: {
|
||||
|
||||
passthru.updateScript = nix-update-script { };
|
||||
|
||||
nativeBuildInputs = [ installFonts ];
|
||||
|
||||
# installFonts adds a hook to `postInstall` that installs fonts
|
||||
# into the correct directories
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
install -Dm444 -t $out/share/fonts/truetype $src/fonts/ttf/*.ttf
|
||||
install -Dm444 -t $out/share/fonts/opentype $src/fonts/otf/*.otf
|
||||
install -Dm444 -t $out/share/fonts/variable $src/fonts/variable/*.ttf
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user