fontconfig: split into multiple outputs

Fixed all 'fontconfig}' references as well, hopefully, ugh!
This commit is contained in:
Vladimír Čunát 2015-10-05 12:23:02 +02:00
parent 32b31398eb
commit f8c211fd2b
18 changed files with 54 additions and 45 deletions

View File

@ -228,7 +228,7 @@ with lib;
# Versioned fontconfig > 2.10. Take shared fonts.conf from fontconfig.
# Otherwise specify only font directories.
environment.etc."fonts/${pkgs.fontconfig.configVersion}/fonts.conf".source =
"${pkgs.fontconfig}/etc/fonts/fonts.conf";
"${pkgs.fontconfig.out}/etc/fonts/fonts.conf";
environment.etc."fonts/${pkgs.fontconfig.configVersion}/conf.d/00-nixos.conf".text =
''

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, makeDesktopItem, makeWrapper
{ stdenv, lib, fetchurl, makeDesktopItem, makeWrapper
, freetype, fontconfig, libX11, libXext, libXrender, zlib
, glib, gtk, libXtst, jre
, webkitgtk2 ? null # for internal web browser
@ -37,7 +37,7 @@ let
interpreter=$(echo ${stdenv.glibc.out}/lib/ld-linux*.so.2)
libCairo=$out/eclipse/libcairo-swt.so
patchelf --set-interpreter $interpreter $out/eclipse/eclipse
[ -f $libCairo ] && patchelf --set-rpath ${freetype}/lib:${fontconfig}/lib:${libX11}/lib:${libXrender}/lib:${zlib}/lib $libCairo
[ -f $libCairo ] && patchelf --set-rpath ${lib.makeLibraryPath [ freetype fontconfig libX11 libXrender zlib ]} "$libCairo"
# Create wrapper script. Pass -configuration to store
# settings in ~/.eclipse/org.eclipse.platform_<version> rather
@ -47,7 +47,7 @@ let
makeWrapper $out/eclipse/eclipse $out/bin/eclipse \
--prefix PATH : ${jre}/bin \
--prefix LD_LIBRARY_PATH : ${glib}/lib:${gtk}/lib:${libXtst}/lib${stdenv.lib.optionalString (webkitgtk2 != null) ":${webkitgtk2}/lib"} \
--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath ([ glib gtk libXtst ] ++ lib.optional (webkitgtk2 != null) webkitgtk2)} \
--add-flags "-configuration \$HOME/.eclipse/''${productId}_$productVersion/configuration"
# Create desktop item.

View File

@ -37,8 +37,8 @@ stdenv.mkDerivation rec {
export POPPLER_LIB_DIR=${poppler_utils}/lib
export MAGICK_INC=${imagemagick}/include/ImageMagick
export MAGICK_LIB=${imagemagick}/lib
export FC_INC_DIR=${fontconfig}/include/fontconfig
export FC_LIB_DIR=${fontconfig}/lib
export FC_INC_DIR=${fontconfig.dev}/include/fontconfig
export FC_LIB_DIR=${fontconfig.lib}/lib
export PODOFO_INC_DIR=${podofo}/include/podofo
export PODOFO_LIB_DIR=${podofo}/lib
export SIP_BIN=${sip_4_16}/bin/sip

View File

@ -32,7 +32,7 @@ stdenv.mkDerivation {
buildCommand = ''
mkdir chroot-fontconfig
cat ${fontconfig}/etc/fonts/fonts.conf > chroot-fontconfig/fonts.conf
cat ${fontconfig.out}/etc/fonts/fonts.conf > chroot-fontconfig/fonts.conf
sed -e 's@</fontconfig>@@' -i chroot-fontconfig/fonts.conf
echo "<dir>${liberation_ttf}</dir>" >> chroot-fontconfig/fonts.conf
echo "</fontconfig>" >> chroot-fontconfig/fonts.conf

View File

@ -36,6 +36,8 @@ stdenv.mkDerivation rec {
})
];
outputs = [ "dev" "lib" "bin" "out" ]; # $out contains all the config
propagatedBuildInputs = [ freetype ];
buildInputs = [ pkgconfig expat ];

View File

@ -8,9 +8,9 @@ runCommand "fonts.conf"
}
''
xsltproc --stringparam fontDirectories "$fontDirectories" \
--stringparam fontconfig "${fontconfig}" \
--stringparam fontconfig "${fontconfig.out}" \
--stringparam fontconfigConfigVersion "${fontconfig.configVersion}" \
--path ${fontconfig}/share/xml/fontconfig \
${./make-fonts-conf.xsl} ${fontconfig}/etc/fonts/fonts.conf \
--path ${fontconfig.out}/share/xml/fontconfig \
${./make-fonts-conf.xsl} ${fontconfig.out}/etc/fonts/fonts.conf \
> $out
''

View File

@ -49,9 +49,9 @@ stdenv.mkDerivation {
${if cursorSupport then "-L${libXcursor}/lib -I${libXcursor}/include" else ""}
${if mysqlSupport then "-qt-sql-mysql -L${mysql.lib}/lib/mysql -I${mysql.lib}/include/mysql" else ""}
${if xftSupport then "-xft
-L${libXft}/lib -I${libXft}/include
-L${libXft.freetype}/lib -I${libXft.freetype}/include
-L${libXft.fontconfig}/lib -I${libXft.fontconfig}/include" else "-no-xft"}
-L${libXft.out}/lib -I${libXft.dev}/include
-L${libXft.freetype.lib}/lib -I${libXft.freetype.dev}/include
-L${libXft.fontconfig.lib}/lib -I${libXft.fontconfig.dev}/include" else "-no-xft"}
";
patches = [

View File

@ -7,6 +7,8 @@
}:
{platformVersions, abiVersions, useGoogleAPIs, useExtraSupportLibs?false, useGooglePlayServices?false}:
with { inherit (stdenv.lib) makeLibraryPath; };
stdenv.mkDerivation rec {
name = "android-sdk-${version}";
version = "24.1.2";
@ -57,7 +59,7 @@ stdenv.mkDerivation rec {
# The following wrapper ensures that they can be found:
wrapProgram `pwd`/android \
--prefix PATH : ${jdk}/bin \
--prefix LD_LIBRARY_PATH : ${glib}/lib:${gtk}/lib:${libXtst}/lib
--prefix LD_LIBRARY_PATH : ${makeLibraryPath [ glib gtk libXtst ]}
# The emulators need additional libraries, which are dynamically loaded => let's wrap them
@ -65,7 +67,7 @@ stdenv.mkDerivation rec {
do
wrapProgram `pwd`/$i \
--prefix PATH : ${file}/bin \
--suffix LD_LIBRARY_PATH : `pwd`/lib:${libX11_32bit}/lib:${libxcb_32bit}/lib:${libXau_32bit}/lib:${libXdmcp_32bit}/lib:${libXext_32bit}/lib:${mesa_32bit}/lib
--suffix LD_LIBRARY_PATH : `pwd`/lib:${makeLibraryPath [ libX11_32bit libxcb_32bit libXau_32bit libXdmcp_32bit libXext_32bit mesa_32bit ]}
done
${stdenv.lib.optionalString (stdenv.system == "x86_64-linux") ''
@ -73,7 +75,7 @@ stdenv.mkDerivation rec {
do
wrapProgram `pwd`/$i \
--prefix PATH : ${file}/bin \
--suffix LD_LIBRARY_PATH : `pwd`/lib:${libX11}/lib:${libxcb}/lib:${libXau}/lib:${libXdmcp}/lib:${libXext}/lib:${mesa}/lib:${alsaLib}/lib
--suffix LD_LIBRARY_PATH : `pwd`/lib:${makeLibraryPath [ libX11 libxcb libXau libXdmcp libXext mesa alsaLib ]}
done
''}
''}
@ -86,10 +88,10 @@ stdenv.mkDerivation rec {
cd lib/monitor-x86
patchelf --set-interpreter ${stdenv.cc.libc.out}/lib/ld-linux.so.2 monitor
patchelf --set-rpath ${libX11}/lib:${libXext}/lib:${libXrender}/lib:${freetype}/lib:${fontconfig}/lib libcairo-swt.so
patchelf --set-rpath ${makeLibraryPath [ libX11 libXext libXrender freetype fontconfig ]} libcairo-swt.so
wrapProgram `pwd`/monitor \
--prefix LD_LIBRARY_PATH : ${gtk}/lib:${atk}/lib:${stdenv.cc.cc}/lib:${libXtst}/lib
--prefix LD_LIBRARY_PATH : ${makeLibraryPath [ gtk atk stdenv.cc.cc libXtst ]}
cd ../..
''
@ -99,10 +101,10 @@ stdenv.mkDerivation rec {
cd lib/monitor-x86_64
patchelf --set-interpreter ${stdenv.cc.libc.out}/lib/ld-linux-x86-64.so.2 monitor
patchelf --set-rpath ${libX11}/lib:${libXext}/lib:${libXrender}/lib:${freetype}/lib:${fontconfig}/lib libcairo-swt.so
patchelf --set-rpath ${makeLibraryPath [ libX11 libXext libXrender freetype fontconfig ]} libcairo-swt.so
wrapProgram `pwd`/monitor \
--prefix LD_LIBRARY_PATH : ${gtk}/lib:${atk}/lib:${stdenv.cc.cc}/lib::${libXtst}/lib
--prefix LD_LIBRARY_PATH : ${makeLibraryPath [ gtk atk stdenv.cc.cc libXtst ]}
cd ../..
''

View File

@ -1,6 +1,9 @@
{ stdenv, fetchurl, freetype, fontconfig, openssl, unzip }:
{ stdenv, lib, fetchurl, freetype, fontconfig, openssl, unzip }:
assert stdenv.lib.elem stdenv.system [ "i686-linux" "x86_64-linux" "x86_64-darwin" ];
let
platforms = [ "i686-linux" "x86_64-linux" "x86_64-darwin" ];
in
assert lib.elem stdenv.system platforms;
stdenv.mkDerivation rec {
name = "phantomjs-1.9.8";
@ -27,12 +30,12 @@ stdenv.mkDerivation rec {
sha256 = "0j0aq8dgzmb210xdrh0v3d4nblskl3zsckl8bzf1a603wcx085cg";
};
buildInputs = if stdenv.isDarwin then [ unzip ] else [];
buildInputs = lib.optional stdenv.isDarwin unzip;
buildPhase = if stdenv.isDarwin then "" else ''
buildPhase = lib.optionalString (!stdenv.isDarwin) ''
patchelf \
--set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
--set-rpath "${freetype}/lib:${fontconfig}/lib:${stdenv.cc.cc}/lib64:${stdenv.cc.cc}/lib:${openssl}/lib" \
--set-rpath "${stdenv.lib.makeLibraryPath [ freetype fontconfig stdenv.cc.cc stdenv.cc.cc openssl ]}" \
bin/phantomjs
'';
@ -60,9 +63,9 @@ stdenv.mkDerivation rec {
'';
homepage = http://phantomjs.org/;
license = stdenv.lib.licenses.bsd3;
license = lib.licenses.bsd3;
maintainers = [ stdenv.lib.maintainers.bluescreen303 ];
platforms = ["i686-linux" "x86_64-linux" "x86_64-darwin" ];
maintainers = [ lib.maintainers.bluescreen303 ];
inherit platforms;
};
}

View File

@ -25,7 +25,7 @@ stdenv.mkDerivation rec {
mv chromedriver $out/bin
patchelf --set-interpreter ${glibc.out}/lib/ld-linux-x86-64.so.2 $out/bin/chromedriver
wrapProgram "$out/bin/chromedriver" \
--prefix LD_LIBRARY_PATH : "$(cat ${stdenv.cc}/nix-support/orig-cc)/lib64:${cairo}/lib:${fontconfig}/lib:${freetype}/lib:${gdk_pixbuf}/lib:${glib}/lib:${gtk}/lib:${libX11}/lib:${nspr}/lib:${nss}/lib:${pango}/lib:${libXrender}/lib:${gconf}/lib:${libXext}/lib:${libXi}/lib:\$LD_LIBRARY_PATH"
--prefix LD_LIBRARY_PATH : "$(cat ${stdenv.cc}/nix-support/orig-cc)/lib64:${stdenv.lib.makeLibraryPath [ cairo fontconfig freetype gdk_pixbuf glib gtk libX11 nspr nss pango libXrender gconf libXext libXi ]}:\$LD_LIBRARY_PATH"
'';
meta = with stdenv.lib; {

View File

@ -1,6 +1,8 @@
{ stdenv, config, fetchurl, libX11, libXext, libXinerama, libXrandr
, libXrender, fontconfig, freetype, openal }:
with { inherit (stdenv.lib) makeLibraryPath; };
stdenv.mkDerivation {
name = "oilrush";
src =
@ -25,25 +27,25 @@ stdenv.mkDerivation {
do
patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" $f
done
patchelf --set-rpath ${stdenv.cc.cc}/lib64:${stdenv.cc.cc}/lib:${libX11}/lib:${libXext}/lib:${libXrender}/lib:${fontconfig}/lib:${freetype}/lib\
patchelf --set-rpath ${stdenv.cc.cc}/lib64:${makeLibraryPath [ stdenv.cc.cc libX11 libXext libXrender fontconfig freetype ]}\
launcher_$arch
patchelf --set-rpath ${stdenv.cc.cc}/lib64:${stdenv.cc.cc}/lib\
libNetwork_$arch.so
patchelf --set-rpath ${stdenv.cc.cc}/lib64:${stdenv.cc.cc}/lib\
libQtCoreUnigine_$arch.so.4
patchelf --set-rpath ${stdenv.cc.cc}/lib64:${stdenv.cc.cc}/lib:${libX11}/lib:${libXext}/lib:${libXrender}/lib:${fontconfig}/lib:${freetype}/lib\
patchelf --set-rpath ${stdenv.cc.cc}/lib64:${makeLibraryPath [ stdenv.cc.cc libX11 libXext libXrender fontconfig freetype ]}\
libQtGuiUnigine_$arch.so.4
patchelf --set-rpath ${stdenv.cc.cc}/lib64:${stdenv.cc.cc}/lib\
libQtNetworkUnigine_$arch.so.4
patchelf --set-rpath ${stdenv.cc.cc}/lib64:${stdenv.cc.cc}/lib:${libX11}/lib:${libXext}/lib:${libXrender}/lib:${fontconfig}/lib:${freetype}/lib\
patchelf --set-rpath ${stdenv.cc.cc}/lib64:${makeLibraryPath [ stdenv.cc.cc libX11 libXext libXrender fontconfig freetype ]}\
libQtWebKitUnigine_$arch.so.4
patchelf --set-rpath ${stdenv.cc.cc}/lib64:${stdenv.cc.cc}/lib\
libQtXmlUnigine_$arch.so.4
patchelf --set-rpath ${stdenv.cc.cc}/lib64:${stdenv.cc.cc}/lib\
libRakNet_$arch.so
patchelf --set-rpath ${stdenv.cc.cc}/lib64:${stdenv.cc.cc}/lib:${libX11}/lib:${libXext}/lib:${libXinerama}/lib:${libXrandr}/lib\
patchelf --set-rpath ${stdenv.cc.cc}/lib64:${makeLibraryPath [ stdenv.cc.cc libX11 libXext libXinerama libXrandr ]}\
libUnigine_$arch.so
patchelf --set-rpath ${stdenv.cc.cc}/lib64:${stdenv.cc.cc}/lib:${libX11}/lib:${libXext}/lib:${libXinerama}/lib:${libXrandr}/lib\
patchelf --set-rpath ${stdenv.cc.cc}/lib64:${makeLibraryPath [ stdenv.cc.cc libX11 libXext libXinerama libXrandr ]}\
OilRush_$arch
'';
installPhase = ''
@ -53,7 +55,7 @@ stdenv.mkDerivation {
mkdir -p "$out/bin"
cat << EOF > "$out/bin/oilrush"
#! /bin/sh
LD_LIBRARY_PATH=.:${openal}/lib:\$LD_LIBRARY_PATH
LD_LIBRARY_PATH=.:${makeLibraryPath [ openal ]}:\$LD_LIBRARY_PATH
cd "$out/opt/oilrush"
exec ./launcher_$arch.sh "\$@"
EOF

View File

@ -23,7 +23,7 @@ stdenv.mkDerivation rec {
installPhase = ''
patchelf \
--set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
--set-rpath "${alsaLib}/lib:${qt48}/lib:${SDL}/lib:${fontconfig}/lib:${freetype}/lib:${SDL_ttf}/lib:${xorg.libX11}/lib:${xorg.libXinerama}/lib:${stdenv.cc.cc}/lib" \
--set-rpath "${stdenv.lib.makeLibraryPath [ alsaLib qt48 SDL fontconfig freetype SDL_ttf xorg.libX11 xorg.libXinerama stdenv.cc.cc ]}" \
share/sdlmame/sdlmame
mkdir -p "$out/bin"

View File

@ -152,7 +152,7 @@ in stdenv.mkDerivation {
--replace "@ENCODINGSDIR@" "${xorg.encodings}/share/fonts/X11/encodings" \
--replace "@MKFONTDIR@" "${xorg.mkfontdir}/bin/mkfontdir" \
--replace "@MKFONTSCALE@" "${xorg.mkfontscale}/bin/mkfontscale" \
--replace "@FC_CACHE@" "${fontconfig}/bin/fc-cache" \
--replace "@FC_CACHE@" "${fontconfig.bin}/bin/fc-cache" \
--replace "@FONTCONFIG_FILE@" "$fontsConfPath"
cp ${./xinitrc} $out/etc/X11/xinit/xinitrc

View File

@ -46,7 +46,7 @@ stdenv.mkDerivation rec {
wrapProgram $out/bin/gnuplot \
--prefix PATH : '${gnused}/bin' \
--prefix PATH : '${coreutils}/bin' \
--prefix PATH : '${fontconfig}/bin' \
--prefix PATH : '${fontconfig.bin}/bin' \
--run '. ${./set-gdfontpath-from-fontconfig.sh}'
'';

View File

@ -5,7 +5,7 @@ export PLAN9_TARGET=$PLAN9
configurePhase()
{
echo CFLAGS=\"-I${fontconfig}/include -I${libXt_dev}/include\" > LOCAL.config
echo CFLAGS=\"-I${fontconfig_dev}/include -I${libXt_dev}/include\" > LOCAL.config
echo X11=\"${libXt_dev}/include\" >> LOCAL.config
for f in `grep -l -r /usr/local/plan9`; do

View File

@ -48,5 +48,5 @@ stdenv.mkDerivation rec {
};
libXt_dev = libXt.dev;
inherit fontconfig;
fontconfig_dev = fontconfig.dev;
}

View File

@ -37,16 +37,16 @@ stdenv.mkDerivation rec {
sed -i 's|self.install_layout == "deb"|False|' setup.py
'' + stdenv.lib.optionalString enableAllFeatures ''
for file in $(find -name "*.py"); do
sed -e 's|cmd = \["xsltproc|cmd = \["${libxslt}/bin/xsltproc|g' \
-e 's|Popen(\["xsltproc|Popen(\["${libxslt}/bin/xsltproc|g' \
sed -e 's|cmd = \["xsltproc|cmd = \["${libxslt.bin}/bin/xsltproc|g' \
-e 's|Popen(\["xsltproc|Popen(\["${libxslt.bin}/bin/xsltproc|g' \
-e 's|cmd = \["texindy|cmd = ["nixpkgs_is_missing_texindy|g' \
-e 's|cmd = "epstopdf|cmd = "${tex}/bin/epstopdf|g' \
-e 's|cmd = \["makeindex|cmd = ["${tex}/bin/makeindex|g' \
-e 's|doc.program = "pdflatex"|doc.program = "${tex}/bin/pdflatex"|g' \
-e 's|self.program = "latex"|self.program = "${tex}/bin/latex"|g' \
-e 's|Popen("pdflatex|Popen("${tex}/bin/pdflatex|g' \
-e 's|"fc-match"|"${fontconfig}/bin/fc-match"|g' \
-e 's|"fc-list"|"${fontconfig}/bin/fc-list"|g' \
-e 's|"fc-match"|"${fontconfig.bin}/bin/fc-match"|g' \
-e 's|"fc-list"|"${fontconfig.bin}/bin/fc-list"|g' \
-e 's|cmd = "inkscape|cmd = "${inkscape}/bin/inkscape|g' \
-e 's|cmd = "fig2dev|cmd = "${transfig}/bin/fig2dev|g' \
-e 's|cmd = \["ps2pdf|cmd = ["${ghostscript}/bin/ps2pdf|g' \

View File

@ -4777,7 +4777,7 @@ let self = _self // overrides; _self = with self; {
# tests fail
doCheck = false;
makeMakerFlags = "--lib_png_path=${pkgs.libpng} --lib_jpeg_path=${pkgs.libjpeg} --lib_zlib_path=${pkgs.zlib} --lib_ft_path=${pkgs.freetype} --lib_fontconfig_path=${pkgs.fontconfig} --lib_xpm_path=${pkgs.xorg.libXpm}";
makeMakerFlags = "--lib_png_path=${pkgs.libpng.out} --lib_jpeg_path=${pkgs.libjpeg.out} --lib_zlib_path=${pkgs.zlib.out} --lib_ft_path=${pkgs.freetype.out} --lib_fontconfig_path=${pkgs.fontconfig.lib} --lib_xpm_path=${pkgs.xorg.libXpm.out}";
};
GDSecurityImage = buildPerlPackage {