aboutsummaryrefslogtreecommitdiff
path: root/package.nix
diff options
context:
space:
mode:
authorrebecca “wiggles” turner <rbt@sent.as>2024-09-11 01:02:27 +0000
committerGerrit Code Review <gerrit@localhost>2024-09-11 01:02:27 +0000
commit24db81eaf28259ab8f8334ccd6368673a26ed422 (patch)
treec39d1cce8fda4184206c8e6e019cffb787228b42 /package.nix
parentcc183fdbc14ce105a5661d646983f791978b9d5c (diff)
parent6de6cae3e70caba0ff8fe3d2d6cb7c4fd0022618 (diff)
Merge "repl: Patch editline to recognize Meta-Left & Meta-Right" into main
Diffstat (limited to 'package.nix')
-rw-r--r--package.nix29
1 files changed, 28 insertions, 1 deletions
diff --git a/package.nix b/package.nix
index eebf222b7..c9341d4cb 100644
--- a/package.nix
+++ b/package.nix
@@ -22,6 +22,7 @@
doxygen,
editline-lix ? __forDefaults.editline-lix,
editline,
+ fetchpatch,
git,
gtest,
jq,
@@ -38,6 +39,7 @@
mercurial,
meson,
ninja,
+ ncurses,
openssl,
pegtl,
pkg-config,
@@ -81,7 +83,32 @@
boehmgc-nix = boehmgc.override { enableLargeConfig = true; };
editline-lix = editline.overrideAttrs (prev: {
- configureFlags = prev.configureFlags or [ ] ++ [ (lib.enableFeature true "sigstop") ];
+ patches = (prev.patches or [ ]) ++ [
+ # Recognize `Alt-Left` and `Alt-Right` for navigating by words in more
+ # terminals/shells/platforms.
+ #
+ # See: https://github.com/troglobit/editline/pull/70/commits
+ (fetchpatch {
+ url = "https://github.com/troglobit/editline/pull/70/commits/d0f2a5bc2300b96b2434c7838184c1dfd6a639f5.diff";
+ hash = "sha256-0bbtYDUlk1wA0kpTtlaNI6KaCjLmAesZjcWBJZ+DpyQ=";
+ })
+
+ (fetchpatch {
+ url = "https://github.com/troglobit/editline/pull/70/commits/4c4455353a0a88bee09d5f27c28f81f747682fed.diff";
+ hash = "sha256-nVezspwVzeB/8zENeKgwPVum0W1MLv4dOW0967WbX5w=";
+ })
+ ];
+
+ configureFlags = (prev.configureFlags or [ ]) ++ [
+ # Enable SIGSTOP (Ctrl-Z) behavior.
+ (lib.enableFeature true "sigstop")
+ # Enable ANSI arrow keys.
+ (lib.enableFeature true "arrow-keys")
+ # Use termcap library to query terminal size.
+ (lib.enableFeature (ncurses != null) "termcap")
+ ];
+
+ nativeBuildInputs = (prev.nativeBuildInputs or [ ]) ++ [ ncurses ];
});
build-release-notes = callPackage ./maintainers/build-release-notes.nix { };