diff --git a/nixos/modules/config/fonts/ghostscript.nix b/nixos/modules/config/fonts/ghostscript.nix index a5508b948990..5db7c0ac7179 100644 --- a/nixos/modules/config/fonts/ghostscript.nix +++ b/nixos/modules/config/fonts/ghostscript.nix @@ -18,6 +18,6 @@ with lib; }; config = mkIf config.fonts.enableGhostscriptFonts { - fonts.packages = [ "${pkgs.ghostscript}/share/ghostscript/fonts" ]; + fonts.packages = [ pkgs.ghostscript.fonts ]; }; } diff --git a/pkgs/applications/graphics/ImageMagick/6.x.nix b/pkgs/applications/graphics/ImageMagick/6.x.nix index 9be6460d8f1d..8ea4bcf7ebe9 100644 --- a/pkgs/applications/graphics/ImageMagick/6.x.nix +++ b/pkgs/applications/graphics/ImageMagick/6.x.nix @@ -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 diff --git a/pkgs/applications/graphics/ImageMagick/default.nix b/pkgs/applications/graphics/ImageMagick/default.nix index 608e7bc50612..f8c09cae194b 100644 --- a/pkgs/applications/graphics/ImageMagick/default.nix +++ b/pkgs/applications/graphics/ImageMagick/default.nix @@ -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 diff --git a/pkgs/misc/drivers/hplip/default.nix b/pkgs/misc/drivers/hplip/default.nix index eb3b84d04529..ad98f3fa768f 100644 --- a/pkgs/misc/drivers/hplip/default.nix +++ b/pkgs/misc/drivers/hplip/default.nix @@ -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 \ diff --git a/pkgs/misc/ghostscript/default.nix b/pkgs/misc/ghostscript/default.nix index 1420290055cb..691a66841090 100644 --- a/pkgs/misc/ghostscript/default.nix +++ b/pkgs/misc/ghostscript/default.nix @@ -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 diff --git a/pkgs/misc/lilypond/default.nix b/pkgs/misc/lilypond/default.nix index acb3a543f68a..e66c76614fb2 100644 --- a/pkgs/misc/lilypond/default.nix +++ b/pkgs/misc/lilypond/default.nix @@ -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/" ]; diff --git a/pkgs/tools/typesetting/tex/nix/default.nix b/pkgs/tools/typesetting/tex/nix/default.nix index e9017333c943..feb444b98ff4 100644 --- a/pkgs/tools/typesetting/tex/nix/default.nix +++ b/pkgs/tools/typesetting/tex/nix/default.nix @@ -243,7 +243,7 @@ rec { # fonts. fontsConf = pkgs.makeFontsConf { fontDirectories = [ - "${pkgs.ghostscript}/share/ghostscript/fonts" + "${pkgs.ghostscript.fonts}/share/fonts" ]; };