kbd: patch paths to decompressors

(cherry picked from commit 449132738dc3128f664772f571ae2f39a17b39ab)
This commit is contained in:
oxalica 2021-05-30 22:59:40 +08:00 committed by github-actions[bot]
parent 013a9ad03b
commit b35b0a5f04

View File

@ -8,6 +8,10 @@
, check
, pam
, coreutils
, gzip
, bzip2
, xz
, zstd
}:
stdenv.mkDerivation rec {
@ -38,6 +42,13 @@ stdenv.mkDerivation rec {
mv fgGIod/trf{,-fgGIod}.map
mv colemak/{en-latin9,colemak}.map
popd
# Fix paths to decompressors. Trailing space to avoid replacing `xz` in `".xz"`.
substituteInPlace src/libkbdfile/kbdfile.c \
--replace 'gzip ' '${gzip}/bin/gzip ' \
--replace 'bzip2 ' '${bzip2.bin}/bin/bzip2 ' \
--replace 'xz ' '${xz.bin}/bin/xz ' \
--replace 'zstd ' '${zstd.bin}/bin/zstd '
'';
postInstall = ''