From 4c10d0da45b1d5d0dcaf4342fd221f77c2d5705d Mon Sep 17 00:00:00 2001 From: sternenseemann <0rpkxez4ksa01gb3typccl0i@systemli.org> Date: Fri, 25 Jun 2021 19:05:20 +0200 Subject: [PATCH 1/2] foot: 1.7.2 -> 1.8.0 * https://codeberg.org/dnkl/foot/releases/tag/1.8.0 * Enable grapheme shaping via fcft and utf8proc. Requires `tweak.grapheme-shaping=yes` in foot.ini as well. --- pkgs/applications/terminal-emulators/foot/default.nix | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/terminal-emulators/foot/default.nix b/pkgs/applications/terminal-emulators/foot/default.nix index 5062329834c4..6667b309d1b3 100644 --- a/pkgs/applications/terminal-emulators/foot/default.nix +++ b/pkgs/applications/terminal-emulators/foot/default.nix @@ -16,6 +16,7 @@ , tllist , wayland-protocols , pkg-config +, utf8proc , allowPgo ? true , python3 # for PGO # for clang stdenv check @@ -25,7 +26,7 @@ }: let - version = "1.7.2"; + version = "1.8.0"; # build stimuli file for PGO build and the script to generate it # independently of the foot's build, so we can cache the result @@ -39,7 +40,7 @@ let src = fetchurl { url = "https://codeberg.org/dnkl/foot/raw/tag/${version}/scripts/generate-alt-random-writes.py"; - sha256 = "019bdiqfi3wx2lwrv3nhq83knc1r3lmqd5zgisa33wwshm2kyv7p"; + sha256 = "0w4d0rxi54p8lvbynypcywqqwbbzmyyzc0svjab27ngmdj1034ii"; }; dontUnpack = true; @@ -93,7 +94,7 @@ stdenv.mkDerivation rec { src = fetchzip { url = "https://codeberg.org/dnkl/${pname}/archive/${version}.tar.gz"; - sha256 = "0iabj9c0dj1r0m89i5gk2jdmwj4wfsai8na54x2w4fq406q6g9nh"; + sha256 = "07irlhkvziv51cp5zn1yz8ljfnrnfjcykv5pgfwmpslw3nl5szxv"; }; nativeBuildInputs = [ @@ -115,6 +116,7 @@ stdenv.mkDerivation rec { wayland libxkbcommon fcft + utf8proc ]; # recommended build flags for performance optimized foot builds From 5e90cb8800ef5fb24b3c2fccb4aecfcbc1926cb0 Mon Sep 17 00:00:00 2001 From: sternenseemann <0rpkxez4ksa01gb3typccl0i@systemli.org> Date: Wed, 2 Jun 2021 17:49:01 +0200 Subject: [PATCH 2/2] foot: install terminfo to separate output * See also https://codeberg.org/dnkl/foot/pulls/607 * propagated-user-env-packages is undocumented unfortunately, but ensure that if you add foot(.out) to your `systemPackages` or install it via `nix-env`, the terminfo output is also installed automatically. * Resolves #125390. --- .../terminal-emulators/foot/default.nix | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/pkgs/applications/terminal-emulators/foot/default.nix b/pkgs/applications/terminal-emulators/foot/default.nix index 6667b309d1b3..f69625e16cd0 100644 --- a/pkgs/applications/terminal-emulators/foot/default.nix +++ b/pkgs/applications/terminal-emulators/foot/default.nix @@ -131,7 +131,11 @@ stdenv.mkDerivation rec { export AR="${ar}" ''; - mesonFlags = [ "--buildtype=release" "-Db_lto=true" ]; + mesonFlags = [ + "--buildtype=release" + "-Db_lto=true" + "-Dterminfo-install-location=${placeholder "terminfo"}/share/terminfo" + ]; # build and run binary generating PGO profiles, # then reconfigure to build the normal foot binary utilizing PGO @@ -148,6 +152,15 @@ stdenv.mkDerivation rec { llvm-profdata merge default_*profraw --output=default.profdata ''; + outputs = [ "out" "terminfo" ]; + + # make sure nix-env and buildEnv also include the + # terminfo output when the package is installed + postInstall = '' + mkdir -p "$out/nix-support" + echo "$terminfo" >> "$out/nix-support/propagated-user-env-packages" + ''; + passthru.tests = { clang-default-compilation = foot.override { inherit (llvmPackages) stdenv;