mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-13 21:50:33 +03:00
Merge pull request #315240 from Cryolitia/ghost-font
ghostscript: add output `fonts`
This commit is contained in:
commit
ee9cf00e6d
7 changed files with 10 additions and 8 deletions
|
@ -18,6 +18,6 @@ with lib;
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf config.fonts.enableGhostscriptFonts {
|
config = mkIf config.fonts.enableGhostscriptFonts {
|
||||||
fonts.packages = [ "${pkgs.ghostscript}/share/ghostscript/fonts" ];
|
fonts.packages = [ pkgs.ghostscript.fonts ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -55,7 +55,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||||
(lib.withFeatureAs (arch != null) "gcc-arch" arch)
|
(lib.withFeatureAs (arch != null) "gcc-arch" arch)
|
||||||
(lib.withFeature librsvgSupport "rsvg")
|
(lib.withFeature librsvgSupport "rsvg")
|
||||||
(lib.withFeature liblqr1Support "lqr")
|
(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.withFeature ghostscriptSupport "gslib")
|
||||||
] ++ lib.optionals stdenv.hostPlatform.isMinGW [
|
] ++ lib.optionals stdenv.hostPlatform.isMinGW [
|
||||||
# due to libxml2 being without DLLs ATM
|
# due to libxml2 being without DLLs ATM
|
||||||
|
|
|
@ -75,7 +75,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||||
(lib.withFeature librsvgSupport "pango")
|
(lib.withFeature librsvgSupport "pango")
|
||||||
(lib.withFeature liblqr1Support "lqr")
|
(lib.withFeature liblqr1Support "lqr")
|
||||||
(lib.withFeature libjxlSupport "jxl")
|
(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.withFeature ghostscriptSupport "gslib")
|
||||||
] ++ lib.optionals stdenv.hostPlatform.isMinGW [
|
] ++ lib.optionals stdenv.hostPlatform.isMinGW [
|
||||||
# due to libxml2 being without DLLs ATM
|
# due to libxml2 being without DLLs ATM
|
||||||
|
|
|
@ -127,7 +127,7 @@ python3Packages.buildPythonApplication {
|
||||||
-e s,/usr/bin/perl,${perl}/bin/perl,g \
|
-e s,/usr/bin/perl,${perl}/bin/perl,g \
|
||||||
-e s,/usr/bin/file,${file}/bin/file,g \
|
-e s,/usr/bin/file,${file}/bin/file,g \
|
||||||
-e s,/usr/bin/gs,${ghostscript}/bin/gs,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,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,Exec=/usr/bin/hp-uiscan,Exec=hp-uiscan,g \
|
||||||
-e s,Icon=/usr/share/icons/Humanity/devices/48/printer.svg,Icon=printer,g \
|
-e s,Icon=/usr/share/icons/Humanity/devices/48/printer.svg,Icon=printer,g \
|
||||||
|
|
|
@ -73,7 +73,7 @@ stdenv.mkDerivation rec {
|
||||||
./doc-no-ref.diff
|
./doc-no-ref.diff
|
||||||
];
|
];
|
||||||
|
|
||||||
outputs = [ "out" "man" "doc" ];
|
outputs = [ "out" "man" "doc" "fonts" ];
|
||||||
|
|
||||||
enableParallelBuilding = true;
|
enableParallelBuilding = true;
|
||||||
|
|
||||||
|
@ -133,7 +133,9 @@ stdenv.mkDerivation rec {
|
||||||
|
|
||||||
cp -r Resource "$out/share/ghostscript/${version}"
|
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 ''
|
'' + lib.optionalString stdenv.isDarwin ''
|
||||||
for file in $out/lib/*.dylib* ; do
|
for file in $out/lib/*.dylib* ; do
|
||||||
install_name_tool -id "$file" $file
|
install_name_tool -id "$file" $file
|
||||||
|
|
|
@ -29,7 +29,7 @@ stdenv.mkDerivation rec {
|
||||||
configureFlags = [
|
configureFlags = [
|
||||||
"--disable-documentation"
|
"--disable-documentation"
|
||||||
# FIXME: these URW fonts are not OTF, configure reports "URW++ OTF files... no".
|
# 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/"
|
"--with-texgyre-dir=${gyre-fonts}/share/fonts/truetype/"
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
|
@ -243,7 +243,7 @@ rec {
|
||||||
# fonts.
|
# fonts.
|
||||||
fontsConf = pkgs.makeFontsConf {
|
fontsConf = pkgs.makeFontsConf {
|
||||||
fontDirectories = [
|
fontDirectories = [
|
||||||
"${pkgs.ghostscript}/share/ghostscript/fonts"
|
"${pkgs.ghostscript.fonts}/share/fonts"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue