fzf: wrap 'perl' in scripts with LOCALE_ARCHIVE
Signed-off-by: Austin Seipp <aseipp@pobox.com>
This commit is contained in:
@@ -1,4 +1,6 @@
|
|||||||
{ lib
|
{ stdenv
|
||||||
|
, lib
|
||||||
|
, pkgs
|
||||||
, buildGoModule
|
, buildGoModule
|
||||||
, fetchFromGitHub
|
, fetchFromGitHub
|
||||||
, writeText
|
, writeText
|
||||||
@@ -6,7 +8,20 @@
|
|||||||
, installShellFiles
|
, installShellFiles
|
||||||
, ncurses
|
, ncurses
|
||||||
, perl
|
, perl
|
||||||
|
, glibcLocales
|
||||||
}:
|
}:
|
||||||
|
|
||||||
|
let
|
||||||
|
# on Linux, wrap perl in the bash completion scripts with the glibc locales,
|
||||||
|
# so that using the shell completion (ctrl+r, etc) doesn't result in ugly
|
||||||
|
# warnings on non-nixos machines
|
||||||
|
ourPerl = if stdenv.isDarwin then perl else (
|
||||||
|
pkgs.writers.writeBashBin "perl" ''
|
||||||
|
#!${pkgs.runtimeShell}
|
||||||
|
export LOCALE_ARCHIVE="${glibcLocales}/lib/locale/locale-archive"
|
||||||
|
exec ${perl}/bin/perl "$@"
|
||||||
|
'');
|
||||||
|
in
|
||||||
buildGoModule rec {
|
buildGoModule rec {
|
||||||
pname = "fzf";
|
pname = "fzf";
|
||||||
version = "0.35.1";
|
version = "0.35.1";
|
||||||
@@ -42,7 +57,7 @@ buildGoModule rec {
|
|||||||
# Has a sneaky dependency on perl
|
# Has a sneaky dependency on perl
|
||||||
# Include first args to make sure we're patching the right thing
|
# Include first args to make sure we're patching the right thing
|
||||||
substituteInPlace shell/key-bindings.bash \
|
substituteInPlace shell/key-bindings.bash \
|
||||||
--replace " perl -n " " ${perl}/bin/perl -n "
|
--replace " perl -n " " ${ourPerl}/bin/perl -n "
|
||||||
'';
|
'';
|
||||||
|
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
|
|||||||
Reference in New Issue
Block a user