mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-10-30 16:10:36 +00:00
ubuntu-classic: use installFonts hook
This commit is contained in:
@@ -24,7 +24,7 @@ phira.override {
|
||||
chmod -R +w $out/assets
|
||||
|
||||
magick -size 4000x2000 canvas:'rgb(128,162,206)' $out/assets/background.jpg
|
||||
cp ${ubuntu-classic}/share/fonts/truetype/ubuntu/Ubuntu-R.ttf $out/assets/font.ttf
|
||||
cp ${ubuntu-classic}/share/fonts/truetype/Ubuntu-R.ttf $out/assets/font.ttf
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
stdenvNoCC,
|
||||
fetchgit,
|
||||
gitUpdater,
|
||||
installFonts,
|
||||
}:
|
||||
|
||||
stdenvNoCC.mkDerivation (finalAttrs: {
|
||||
@@ -15,12 +16,11 @@ stdenvNoCC.mkDerivation (finalAttrs: {
|
||||
hash = "sha256-GrpBVgisVu7NklFYqkEqYi0hui/pCHlsM3Ky4mEUq90=";
|
||||
};
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
nativeBuildInputs = [ installFonts ];
|
||||
|
||||
install -m444 -Dt $out/share/fonts/truetype/ubuntu *.ttf
|
||||
|
||||
runHook postInstall
|
||||
# Hinting sources such as sources/VTT/Ubuntu-B-hinting.ttf are not fonts to install
|
||||
preInstall = ''
|
||||
rm -r sources
|
||||
'';
|
||||
|
||||
passthru.updateScript = gitUpdater { rev-prefix = "import/"; };
|
||||
|
||||
Reference in New Issue
Block a user