git.iko.soy/typeable/nixpkgs
on master help sign in
lldb-4: Patch to fix libedit usage on Linux

Idea from: https://bugs.llvm.org//show_bug.cgi?id=28898#c7 Fixes ability to use arrow keys.

commit5e659e94a6061c9acd983ad0b5c26206b83f5735 authorWill Dietz <w@wdtz.org> dateThu 25 May 2017, 15:07 (10 years ago) parent8091869
2 files changed+32−5
pkgs/development/compilers/llvm/4/lldb-libedit.patch+30 pkgs/development/compilers/llvm/4/lldb.nix+2−5
pkgs/development/compilers/llvm/4/lldb-libedit.patchnew file+30
@@ -0,0 +1,30 @@
1+From 94764369222a8e6c65420a6981d7f179a18a5417 Mon Sep 17 00:00:00 2001
2+From: Will Dietz <w@wdtz.org>
3+Date: Thu, 25 May 2017 15:03:42 -0500
4+Subject: [PATCH] EditLine.h: libedit supports wide chars on NixOS
5+
6+---
7+ include/lldb/Host/Editline.h | 5 +----
8+ 1 file changed, 1 insertion(+), 4 deletions(-)
9+
10+diff --git a/include/lldb/Host/Editline.h b/include/lldb/Host/Editline.h
11+index faed373bc..b248cdee1 100644
12+--- a/include/lldb/Host/Editline.h
13++++ b/include/lldb/Host/Editline.h
14+@@ -43,12 +43,9 @@
15+ // will only be
16+ // used in cases where this is true. This is a compile time dependecy, for now
17+ // selected per target Platform
18+-#if defined(__APPLE__) || defined(__FreeBSD__) || defined(__NetBSD__)
19++// (libedit on NixOS is always wide-char capable)
20+ #define LLDB_EDITLINE_USE_WCHAR 1
21+ #include <codecvt>
22+-#else
23+-#define LLDB_EDITLINE_USE_WCHAR 0
24+-#endif
25+
26+ #include "lldb/Host/ConnectionFileDescriptor.h"
27+ #include "lldb/lldb-private.h"
28+--
29+2.13.0
30+
pkgs/development/compilers/llvm/4/lldb.nix+2−5
@@ -19,7 +19,8 @@ stdenv.mkDerivation {
1919
2020 src = fetch "lldb" "0g83hbw1r4gd0z8hlph9i34xs6dlcc69vz3h2bqwkhb2qq2qzg9d";
2121
22− patchPhase = ''
22+ patches = [ ./lldb-libedit.patch ];
23+ postPatch = ''
2324 # Fix up various paths that assume llvm and clang are installed in the same place
2425 sed -i 's,".*ClangConfig.cmake","${clang-unwrapped}/lib/cmake/clang/ClangConfig.cmake",' \
2526 cmake/modules/LLDBStandalone.cmake
@@ -35,10 +36,6 @@ stdenv.mkDerivation {
3536 CXXFLAGS = "-fno-rtti";
3637 hardeningDisable = [ "format" ];
3738
38− cmakeFlags = [
39− "-DLLDB_DISABLE_LIBEDIT=ON"
40− ];
41−
4239 enableParallelBuilding = true;
4340
4441 meta = with stdenv.lib; {