diff --git a/pkgs/by-name/mp/mpv/scripts/modernx-zydezu.nix b/pkgs/by-name/mp/mpv/scripts/modernx-zydezu.nix index d0ac93c53d24..a89341386037 100644 --- a/pkgs/by-name/mp/mpv/scripts/modernx-zydezu.nix +++ b/pkgs/by-name/mp/mpv/scripts/modernx-zydezu.nix @@ -2,6 +2,7 @@ lib, buildLua, fetchFromGitHub, + installFonts, makeFontsConf, nix-update-script, }: @@ -17,10 +18,8 @@ buildLua (finalAttrs: { hash = "sha256-a+StfEYQwt5NuELvanvZllrD2RQ0g9JBpCznMdSDM5Y="; }; - postInstall = '' - mkdir -p $out/share/fonts - cp -r *.ttf $out/share/fonts - ''; + nativeBuildInputs = [ installFonts ]; + passthru.extraWrapperArgs = [ "--set" "FONTCONFIG_FILE" diff --git a/pkgs/by-name/mp/mpv/scripts/modernx.nix b/pkgs/by-name/mp/mpv/scripts/modernx.nix index a5ae4e7b3c6f..886ba96a437f 100644 --- a/pkgs/by-name/mp/mpv/scripts/modernx.nix +++ b/pkgs/by-name/mp/mpv/scripts/modernx.nix @@ -2,6 +2,7 @@ lib, buildLua, fetchFromGitHub, + installFonts, makeFontsConf, nix-update-script, }: @@ -17,10 +18,8 @@ buildLua (finalAttrs: { hash = "sha256-q7DwyfmOIM7K1L7vvCpq1EM0RVpt9E/drhAa9rLYb1k="; }; - postInstall = '' - mkdir -p $out/share/fonts - cp -r *.ttf $out/share/fonts - ''; + nativeBuildInputs = [ installFonts ]; + passthru.extraWrapperArgs = [ "--set" "FONTCONFIG_FILE" diff --git a/pkgs/by-name/mp/mpv/scripts/modernz.nix b/pkgs/by-name/mp/mpv/scripts/modernz.nix index 17b0700286fd..ac8ac744fa0a 100644 --- a/pkgs/by-name/mp/mpv/scripts/modernz.nix +++ b/pkgs/by-name/mp/mpv/scripts/modernz.nix @@ -2,6 +2,7 @@ lib, buildLua, fetchFromGitHub, + installFonts, makeFontsConf, nix-update-script, }: @@ -17,9 +18,7 @@ buildLua (finalAttrs: { hash = "sha256-9jth8TCAx/cmbAfO8s+1WPpMDuF79gQtVlC4OG2adrA="; }; - postInstall = '' - install -Dt $out/share/fonts *.ttf - ''; + nativeBuildInputs = [ installFonts ]; passthru.extraWrapperArgs = [ "--set" diff --git a/pkgs/by-name/mp/mpv/scripts/mpv-osc-modern.nix b/pkgs/by-name/mp/mpv/scripts/mpv-osc-modern.nix index 89231e405a1f..f9dba8fe9808 100644 --- a/pkgs/by-name/mp/mpv/scripts/mpv-osc-modern.nix +++ b/pkgs/by-name/mp/mpv/scripts/mpv-osc-modern.nix @@ -2,6 +2,7 @@ lib, buildLua, fetchFromGitHub, + installFonts, makeFontsConf, nix-update-script, }: @@ -17,10 +18,8 @@ buildLua (finalAttrs: { hash = "sha256-RMUy8UpSRSCEPAbnGLpJ2NjDsDdkjq8cNsdGwsQ5ANU="; }; - postInstall = '' - mkdir -p $out/share/fonts - cp -r *.ttf $out/share/fonts - ''; + nativeBuildInputs = [ installFonts ]; + passthru.extraWrapperArgs = [ "--set" "FONTCONFIG_FILE"