I'm trying to update the notion window manager and I'm getting these font errors when I run it. How can I make these default fonts available to notion when it runs?
System: (NixOS: nixos-version, Ubuntu/Fedora: lsb_release -a, ...)
nixos 17.03.1700.51a83266d1 (Gorilla)
Nix version: (run nix-env --version)
nix-env (Nix) 1.11.13
Nixpkgs version: (run nix-instantiate --eval '<nixpkgs>' -A lib.nixpkgsVersion)
grep build-use-sandbox /etc/nix/nix.conf)Just making sure, you're sure you don't need that patch anymore right? (And also question, shouldn't the sha256 be different than before..?)
You can add fonts in the notion module:
{
fonts.fonts = [ pkgs.dejavu_fonts ]; # whatever font you need here.
}
@vyp looking at the source the patch modifies I noticed notion has implemented xft support already. The hash issue is strange to me. Maybe there is something wrong with my workflow. From the top dir of local branch I have been executing nix-env -f . -i notion. I expected nix to complain about the hash so I could change it to the expected hash but that never happened. Then I run a script containing
#!/usr/bin/env bash
Xephyr -ac -screen 800x600 -br -reset -terminate 2> /dev/null :3 &
sleep 10s
DISPLAY=:3.0 notion &
This opens notion which logs the font issues.
@Mic92 Thanks! I will try that out.
@moaxcp Ok just making sure. But the hash thing is really strange, I just ran nix-prefetch-url 'https://github.com/raboof/notion/archive/3-2017050501.tar.gz' and got the following hash (which is different to the one in your nix expression):
1fsvv6182jjgh40i1x0pvswf2gm6wfj8xpzzv827ixifc03r2r50
@vyp Yeah it is really strange. I just changed the hash in my local branch, ran nix-env -f . -i notion and nix downloaded and installed the new version.
Still not sure about the fonts though. I'm not using the module when I install it.
I guess what I mean to say is I'm not seeing anything changing when I add
fonts.fonts = [pkgs.xorg.libXfont ];
to nixos/modules/services/x11/window-managers/notion.nix
john@n1 ~/p/nixpkgs (local)> nano nixos/modules/services/x11/window-managers/notion.nix
# added font section
john@n1 ~/p/nixpkgs (local)> nix-env -f . -i notion
replacing old ‘notion’
installing ‘notion’
I also ran xfontsel in the Xephyr window while notion was running. It says it cannot find the font. When I run it from my normal desktop xfontsel can find it. Maybe there are settings that need to be passed into Xephyr?
@Mic92, @vyp
I am certain this is an issue with the Font Path within Xephyr. In my normal display the Font Path is
Font Path:
/nix/store/mlqxn009bmvdfs6nmvl1j5990b4d998f-font-bh-lucidatypewriter-100dpi-1.0.3/lib/X11/fonts/100dpi,/nix/store/rsbmi2a9755rwac320y54kwskyjblxaq-font-bh-lucidatypewriter-75dpi-1.0.3/lib/X11/fonts/75dpi,/nix/store/ap7mcz50grzaaxij41qm28j64na2sdv1-font-bh-100dpi-1.0.3/lib/X11/fonts/100dpi,/nix/store/d725g55xv9sm7c209c1w09ddnlvkvmaj-font-misc-misc-1.1.2/lib/X11/fonts/misc,/nix/store/xr71cqnlkybakc0pqlcy5d809rw83fnb-font-cursor-misc-1.0.3/lib/X11/fonts/misc,/nix/store/crm91wmqqbqyyvmvjif1jz81j960vnmw-unifont-9.0.06/share/fonts,/nix/store/dad9v8c6822kkrfdrln20shqm9li7msc-terminus-font-4.40/share/fonts/terminus,/nix/store/7y5330k4dgb8fbdmr4szmpqn9p9xmv95-font-adobe-100dpi-1.0.3/lib/X11/fonts/100dpi,/nix/store/qv4y1pd98xd8wgkpaqv5rwxn2j0fd3k9-font-adobe-75dpi-1.0.3/lib/X11/fonts/75dpi,built-ins
Within Xephyr it is
Font Path:
built-ins
Maybe this is not an issue with notion missing fonts but for Xephyr? I'm going to try leaving this open until I can try it in a vm or a different user on nixos.
@Mic92, @vyp
I figured out how to send the fonts to Xephyr using the -fp option. This solved the fonts problem for me. Thanks for all the help!
(Fellow notion user)
When I test notion in Xephyr I use Xephyr -fp $(xset q | grep "Font Path:" -A1 | tail -n1)
Btw: if you update, could you replace busybox with which in the dependencies? (https://github.com/NixOS/nixpkgs/pull/18747)