ghostscript: add output fonts

This commit is contained in:
北雁 Cryolitia 2024-05-28 11:50:34 +08:00
parent 150a859d34
commit 93a9ca34fe
No known key found for this signature in database
GPG Key ID: 3E5D1772FC8A8EDD
7 changed files with 10 additions and 8 deletions

View File

@ -18,6 +18,6 @@ with lib;
};
config = mkIf config.fonts.enableGhostscriptFonts {
fonts.packages = [ "${pkgs.ghostscript}/share/ghostscript/fonts" ];
fonts.packages = [ pkgs.ghostscript.fonts ];
};
}

View File

@ -55,7 +55,7 @@ stdenv.mkDerivation (finalAttrs: {
(lib.withFeatureAs (arch != null) "gcc-arch" arch)
(lib.withFeature librsvgSupport "rsvg")
(lib.withFeature liblqr1Support "lqr")
(lib.withFeatureAs ghostscriptSupport "gs-font-dir" "${ghostscript}/share/ghostscript/fonts")
(lib.withFeatureAs ghostscriptSupport "gs-font-dir" "${ghostscript.fonts}/share/fonts")
(lib.withFeature ghostscriptSupport "gslib")
] ++ lib.optionals stdenv.hostPlatform.isMinGW [
# due to libxml2 being without DLLs ATM

View File

@ -75,7 +75,7 @@ stdenv.mkDerivation (finalAttrs: {
(lib.withFeature librsvgSupport "pango")
(lib.withFeature liblqr1Support "lqr")
(lib.withFeature libjxlSupport "jxl")
(lib.withFeatureAs ghostscriptSupport "gs-font-dir" "${ghostscript}/share/ghostscript/fonts")
(lib.withFeatureAs ghostscriptSupport "gs-font-dir" "${ghostscript.fonts}/share/fonts")
(lib.withFeature ghostscriptSupport "gslib")
] ++ lib.optionals stdenv.hostPlatform.isMinGW [
# due to libxml2 being without DLLs ATM

View File

@ -127,7 +127,7 @@ python3Packages.buildPythonApplication {
-e s,/usr/bin/perl,${perl}/bin/perl,g \
-e s,/usr/bin/file,${file}/bin/file,g \
-e s,/usr/bin/gs,${ghostscript}/bin/gs,g \
-e s,/usr/share/cups/fonts,${ghostscript}/share/ghostscript/fonts,g \
-e s,/usr/share/cups/fonts,${ghostscript.fonts}/share/fonts,g \
-e "s,ExecStart=/usr/bin/python /usr/bin/hp-config_usb_printer,ExecStart=$out/bin/hp-config_usb_printer,g" \
-e s,Exec=/usr/bin/hp-uiscan,Exec=hp-uiscan,g \
-e s,Icon=/usr/share/icons/Humanity/devices/48/printer.svg,Icon=printer,g \

View File

@ -73,7 +73,7 @@ stdenv.mkDerivation rec {
./doc-no-ref.diff
];
outputs = [ "out" "man" "doc" ];
outputs = [ "out" "man" "doc" "fonts" ];
enableParallelBuilding = true;
@ -133,7 +133,9 @@ stdenv.mkDerivation rec {
cp -r Resource "$out/share/ghostscript/${version}"
ln -s "${fonts}" "$out/share/ghostscript/fonts"
mkdir -p $fonts/share/fonts
cp -rv ${fonts}/* "$fonts/share/fonts/"
ln -s "$fonts/share/fonts" "$out/share/ghostscript/fonts"
'' + lib.optionalString stdenv.isDarwin ''
for file in $out/lib/*.dylib* ; do
install_name_tool -id "$file" $file

View File

@ -29,7 +29,7 @@ stdenv.mkDerivation rec {
configureFlags = [
"--disable-documentation"
# FIXME: these URW fonts are not OTF, configure reports "URW++ OTF files... no".
"--with-urwotf-dir=${ghostscript}/share/ghostscript/fonts"
"--with-urwotf-dir=${ghostscript.fonts}/share/fonts"
"--with-texgyre-dir=${gyre-fonts}/share/fonts/truetype/"
];

View File

@ -243,7 +243,7 @@ rec {
# fonts.
fontsConf = pkgs.makeFontsConf {
fontDirectories = [
"${pkgs.ghostscript}/share/ghostscript/fonts"
"${pkgs.ghostscript.fonts}/share/fonts"
];
};