diff --git a/pkgs/by-name/xi/xits-math/package.nix b/pkgs/by-name/xi/xits-math/package.nix index 37c0fad2656a..6573b4d6c624 100644 --- a/pkgs/by-name/xi/xits-math/package.nix +++ b/pkgs/by-name/xi/xits-math/package.nix @@ -3,6 +3,7 @@ stdenv, fetchFromGitHub, python3Packages, + installFonts, }: stdenv.mkDerivation (finalAttrs: { @@ -16,21 +17,23 @@ stdenv.mkDerivation (finalAttrs: { sha256 = "1x3r505dylz9rz8dj98h5n9d0zixyxmvvhnjnms9qxdrz9bxy9g1"; }; - nativeBuildInputs = ( - with python3Packages; - [ + nativeBuildInputs = + (with python3Packages; [ python fonttools fontforge - ] - ); + ]) + ++ [ installFonts ]; postPatch = '' rm *.otf ''; + # installFonts adds a hook to `postInstall` that installs fonts + # into the correct directories installPhase = '' - install -m444 -Dt $out/share/fonts/opentype *.otf + runHook preInstall + runHook postInstall ''; meta = {