artiq: fix fontconfig warning on non-NixOS

Previous warning:
```
Fontconfig warning: "/etc/fonts/fonts.conf", line 5: unknown element "its:rules"
Fontconfig warning: "/etc/fonts/fonts.conf", line 6: unknown element "its:translateRule"
Fontconfig error: "/etc/fonts/fonts.conf", line 6: invalid attribute 'translate'
Fontconfig error: "/etc/fonts/fonts.conf", line 6: invalid attribute 'selector'
Fontconfig error: "/etc/fonts/fonts.conf", line 7: invalid attribute 'xmlns:its'
Fontconfig error: "/etc/fonts/fonts.conf", line 7: invalid attribute 'version'
Fontconfig warning: "/etc/fonts/fonts.conf", line 9: unknown element "description"
Fontconfig error: Cannot load config file from /etc/fonts/fonts.conf
```
Ref: https://discourse.nixos.org/t/fonts-in-nix-installed-packages-on-a-non-nixos-system/5871/7
This commit is contained in:
Drew Risinger 2021-06-04 17:09:43 -04:00
parent b8d4da3004
commit 005d911fb7
1 changed files with 5 additions and 2 deletions

View File

@ -1,4 +1,4 @@
{ stdenv, lib, pythonDeps, fetchgit, git, python3Packages, qt5, binutils-or1k, binutils-arm, llvm-or1k, llvmlite-artiq, libartiq-support, lit, outputcheck }: { stdenv, lib, pythonDeps, fetchgit, git, python3Packages, qt5, binutils-or1k, binutils-arm, llvm-or1k, llvmlite-artiq, libartiq-support, lit, outputcheck, fontconfig }:
python3Packages.buildPythonPackage rec { python3Packages.buildPythonPackage rec {
pname = "artiq"; pname = "artiq";
@ -23,7 +23,10 @@ python3Packages.buildPythonPackage rec {
# Modifies PATH to pass the wrapped python environment (i.e. python3.withPackages(...) to subprocesses. # Modifies PATH to pass the wrapped python environment (i.e. python3.withPackages(...) to subprocesses.
# Allows subprocesses using python to find all packages you have installed # Allows subprocesses using python to find all packages you have installed
makeWrapperArgs = [ ''--run 'if [ ! -z "$NIX_PYTHONPREFIX" ]; then export PATH=$NIX_PYTHONPREFIX/bin:$PATH;fi' '' ]; makeWrapperArgs = [
''--run 'if [ ! -z "$NIX_PYTHONPREFIX" ]; then export PATH=$NIX_PYTHONPREFIX/bin:$PATH;fi' ''
"--set FONTCONFIG_FILE ${fontconfig.out}/etc/fonts/fonts.conf"
];
checkInputs = [ binutils-or1k outputcheck ]; checkInputs = [ binutils-or1k outputcheck ];
checkPhase = checkPhase =