about summary refs log tree commit diff
diff options
context:
space:
mode:
authorsefidel <contact@sefidel.net>2022-04-02 13:32:45 +0900
committersefidel <contact@sefidel.net>2022-04-02 13:32:45 +0900
commit066efabbfc0b9c261349e08dfbd076cdedb74a40 (patch)
tree1a60616d9467007c39455e3a9bd77509eada0210
parent33c3ad0e537c1c678a532d5aa8b234c082701de4 (diff)
downloadnixrc-066efabbfc0b9c261349e08dfbd076cdedb74a40.tar.gz
nixrc-066efabbfc0b9c261349e08dfbd076cdedb74a40.zip
feat(home/development): add codelldb
-rw-r--r--home/profiles/development/default.nix4
-rw-r--r--packages/default.nix9
2 files changed, 13 insertions, 0 deletions
diff --git a/home/profiles/development/default.nix b/home/profiles/development/default.nix
index 6b064b6..abed77b 100644
--- a/home/profiles/development/default.nix
+++ b/home/profiles/development/default.nix
@@ -2,6 +2,8 @@
 
 let
   cfg = config.profiles.development;
+
+  inherit (self.packages.x86_64-linux) codelldb;
 in
 {
   options.profiles.development = {
@@ -87,6 +89,7 @@ in
       pkgs.hyperfine
       pkgs.jq
       pkgs.lsof
+      pkgs.lldb
       pkgs.ouch
       pkgs.tcpdump
       pkgs.tokei
@@ -108,6 +111,7 @@ in
       pkgs.cargo-deny
     ];
 
+    home.file.".codelldb".source = pkgs.vscode-extensions.vadimcn.vscode-lldb;
   };
 }
 
diff --git a/packages/default.nix b/packages/default.nix
index 0f6e9ec..99ad632 100644
--- a/packages/default.nix
+++ b/packages/default.nix
@@ -1,5 +1,14 @@
 { self, neovim, ... } @ inputs:
 
+let
+  pkgs = inputs.unstable.legacyPackages.x86_64-linux;
+  vscode-lldb = pkgs.vscode-extensions.vadimcn.vscode-lldb;
+in
+
 {
   "neovim" = neovim.packages.x86_64-linux.neovim;
+  "codelldb" = pkgs.writeScriptBin "codelldb" ''
+    ${vscode-lldb}/share/vscode/extensions/vadimcn.vscode-lldb/adapter/.codelldb-wrapped_ \
+    --liblldb ${vscode-lldb}/share/vscode/extensions/vadimcn.vscode-lldb/lldb/lib/liblldb.so $@
+  '';
 }