llvmPackages_13.lldb: python into lib & wrap binary

Ported from cc7740ae770c52ac1f385aa25cfc143fe79c6b6e.

+19 -3
+5 -2
pkgs/development/compilers/llvm/13/lldb/default.nix
··· 19 19 , Carbon 20 20 , Cocoa 21 21 , lit 22 + , makeWrapper 22 23 , enableManpages ? false 23 24 }: 24 25 ··· 42 43 outputs = [ "out" "lib" "dev" ]; 43 44 44 45 nativeBuildInputs = [ 45 - cmake python3 which swig lit 46 + cmake python3 which swig lit makeWrapper 46 47 ] ++ lib.optionals enableManpages [ 47 48 python3.pkgs.sphinx python3.pkgs.recommonmark 48 49 ]; ··· 85 86 doCheck = false; 86 87 87 88 installCheckPhase = '' 88 - if [ ! -e "$out/lib/python3.8/site-packages/lldb/_lldb.so" ] ; then 89 + if [ ! -e "$lib/${python3.sitePackages}/lldb/_lldb.so" ] ; then 89 90 return 1; 90 91 fi 91 92 ''; 92 93 93 94 postInstall = '' 95 + wrapProgram $out/bin/lldb --prefix PYTHONPATH : $lib/${python3.sitePackages}/ 96 + 94 97 # Editor support 95 98 # vscode: 96 99 install -D ../tools/lldb-vscode/package.json $out/share/vscode/extensions/llvm-org.lldb-vscode-0.1.0/package.json
+14 -1
pkgs/development/compilers/llvm/13/lldb/gnu-install-dirs.patch
··· 75 75 +set(LLVM_LIBRARY_OUTPUT_INTDIR ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}) 76 76 if(WIN32 OR CYGWIN) 77 77 # DLL platform -- put DLLs into bin. 78 - set(LLVM_SHLIB_OUTPUT_INTDIR ${LLVM_RUNTIME_OUTPUT_INTDIR}) 78 + set(LLVM_SHLIB_OUTPUT_INTDIR ${LLVM_RUNTIME_OUTPUT_INTDIR}) 79 + diff --git a/CMakeLists.txt b/CMakeLists.txt 80 + index b5633e2..86e4738 100644 81 + --- a/CMakeLists.txt 82 + +++ b/CMakeLists.txt 83 + @@ -79,7 +79,7 @@ if (LLDB_ENABLE_PYTHON) 84 + if(LLDB_BUILD_FRAMEWORK) 85 + set(lldb_python_target_dir "${LLDB_FRAMEWORK_ABSOLUTE_BUILD_DIR}/LLDB.framework/Resources/Python/lldb") 86 + else() 87 + - set(lldb_python_target_dir "${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/${LLDB_PYTHON_RELATIVE_PATH}/lldb") 88 + + set(lldb_python_target_dir "${CMAKE_INSTALL_LIBDIR}/../${LLDB_PYTHON_RELATIVE_PATH}/lldb") 89 + endif() 90 + get_target_property(lldb_python_bindings_dir swig_wrapper_python BINARY_DIR) 91 + finish_swig_python("lldb-python" "${lldb_python_bindings_dir}" "${lldb_python_target_dir}")