From 005d911fb7ed1c85d9123a927543608bfcbdd66a Mon Sep 17 00:00:00 2001 From: Drew Risinger Date: Fri, 4 Jun 2021 17:09:43 -0400 Subject: [PATCH] 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 --- artiq-fast/pkgs/artiq.nix | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/artiq-fast/pkgs/artiq.nix b/artiq-fast/pkgs/artiq.nix index d60cbd8..5385e9b 100644 --- a/artiq-fast/pkgs/artiq.nix +++ b/artiq-fast/pkgs/artiq.nix @@ -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 { pname = "artiq"; @@ -23,7 +23,10 @@ python3Packages.buildPythonPackage rec { # 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 - 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 ]; checkPhase =