<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>Nix on かおるのブログ</title>
    <link>https://blog.kaorubb.org/ja/tags/nix/</link>
    <description>Recent content in Nix on かおるのブログ</description>
    <generator>Hugo -- 0.147.8</generator>
    <language>ja</language>
    <lastBuildDate>Wed, 02 Jul 2025 11:16:00 +0900</lastBuildDate>
    <atom:link href="https://blog.kaorubb.org/ja/tags/nix/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>gpt.el &amp; mcp.el で整う emacs llm環境</title>
      <link>https://blog.kaorubb.org/ja/posts/gpt-mcp-setup/</link>
      <pubDate>Wed, 02 Jul 2025 11:16:00 +0900</pubDate>
      <guid>https://blog.kaorubb.org/ja/posts/gpt-mcp-setup/</guid>
      <description>&lt;h2 id=&#34;はじめに&#34;&gt;はじめに&lt;/h2&gt;
&lt;p&gt;Emacs内での大規模言語モデル（LLM）との連携は、ここ数年で劇的な進化を遂げてきました。&lt;/p&gt;
&lt;p&gt;私の最初のEmacs 内LLMとの出会いは2022年11月、&lt;a href=&#34;https://github.com/copilot-emacs/copilot.el&#34;&gt;copilot.el&lt;/a&gt; によるAI 自動補完でした。このときの感動は鮮明に覚えています。&lt;/p&gt;
&lt;p&gt;その後間もなくChatGPT が登場し、&lt;a href=&#34;https://github.com/joshcho/ChatGPT.el&#34;&gt;ChatGPT.el&lt;/a&gt; 等でEmacs内でのAIとの対話ができるようになりましたが、当時は機能も少なく、EmacsでLLMを使うメリットはあまり感じられませんでした。&lt;/p&gt;
&lt;p&gt;自分的ブレークスルーは、東京Emacs勉強会 サマーフェスティバル2024 のTomoya さんの発表で &lt;a href=&#34;https://github.com/s-kostyaev/ellama&#34;&gt;ellama&lt;/a&gt; を知ったことでした。
ellamaでは従来の対話形式だけでなく、様々な関数を通じてLLMを利用でき、Emacs が何倍も強力な開発環境へと変貌しました。&lt;/p&gt;
&lt;p&gt;そして最近では &lt;a href=&#34;https://github.com/karthink/gptel&#34;&gt;gptel&lt;/a&gt; が &lt;a href=&#34;https://github.com/doomemacs/doomemacs/commit/6898a9c267fd97d9934c00ea9a2d55ad30a2263f&#34;&gt;llm module として doom emacs に正式に組み込まれ&lt;/a&gt;、ツール連携やプロンプト/コンテクストエンジニアリング&lt;sup id=&#34;fnref:1&#34;&gt;&lt;a href=&#34;#fn:1&#34; class=&#34;footnote-ref&#34; role=&#34;doc-noteref&#34;&gt;1&lt;/a&gt;&lt;/sup&gt;が非常にスムーズになりました。&lt;/p&gt;
&lt;p&gt;これと&lt;a href=&#34;https://github.com/lizqwerscott/mcp.el&#34;&gt;mcp.el&lt;/a&gt; と組み合わせることで、LLM in emacs がある種のplateau に達したのではと感じている今、これを知らないEmacser (同胞) がもしいたら非常に勿体ないと思うので、この記事を書くことにしました。&lt;/p&gt;
&lt;p&gt;&lt;code&gt;gptel&lt;/code&gt;, &lt;code&gt;mcp.el&lt;/code&gt; の設定方法や使う理由、ユースケースなどを紹介します。&lt;/p&gt;
&lt;style&gt;
.mermaid {
    text-align: center;
}
&lt;/style&gt;
&lt;pre class=&#34;mermaid&#34;&gt;
  gantt
    title 私のEmacs 内LLM 遍歴
    todayMarker off
    dateFormat YYYY-MM
    axisFormat %Y-%m
    section 自動補完
        copilot.el :2022-11, 32M
    section 黎明期
        ChatGPT.el :2023-03, 17M
        org-ai :2023-12, 8M
    section 革命
        ellama/llm              :2024-08, 9M
    section 開拓期
        ai-org-chat :2024-11, 2M
        ob-llm :2025-01, 2M
        elisa :2025-03, 1M
        copilot-chat.el     :2025-03, 2M
    section 成熟期
        gptel+mcp.el              :2025-05, 2M
        claude-code.el              :2025-06, 1M
&lt;/pre&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com/copilot-emacs/copilot.el&#34;&gt;copilot-emacs/copilot.el: An unofficial Copilot plugin for Emacs.&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com/joshcho/ChatGPT.el&#34;&gt;joshcho/ChatGPT.el: ChatGPT in Emacs&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com/rksm/org-ai&#34;&gt;rksm/org-ai: Emacs as your personal AI assistant&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com/s-kostyaev/ellama&#34;&gt;s-kostyaev/ellama: Ellama is a tool for interacting with large language models from Emacs.&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com/ahyatt/llm&#34;&gt;ahyatt/llm: A package abstracting llm capabilities for emacs.&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com/ultronozm/ai-org-chat.el&#34;&gt;ultronozm/ai-org-chat.el&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com/jiyans/ob-llm&#34;&gt;jiyans/ob-llm&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com/s-kostyaev/elisa&#34;&gt;s-kostyaev/elisa: ELISA (Emacs Lisp Information System Assistant) is a system designed to provide informative answers to user queries by leveraging a Retrieval Augmented Generation (RAG) approach.&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com/chep/copilot-chat.el&#34;&gt;chep/copilot-chat.el: Chat with Github copilot in Emacs !&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com/karthink/gptel&#34;&gt;karthink/gptel: A simple LLM client for Emacs&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com/lizqwerscott/mcp.el&#34;&gt;lizqwerscott/mcp.el: An Mcp client inside Emacs&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com/stevemolitor/claude-code.el&#34;&gt;stevemolitor/claude-code.el: Claude Code Emacs integration&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;gptel-とは&#34;&gt;&lt;code&gt;gptel&lt;/code&gt; とは&lt;/h2&gt;
&lt;p&gt;&lt;a href=&#34;https://github.com/karthink/gptel&#34;&gt;gptel&lt;/a&gt;は、Emacsのためのシンプルかつ強力な大規模言語モデル（LLM）クライアントです。
Emacs内のあらゆる場所から自由な形式でLLMと対話できる環境を提供します。
&lt;a href=&#34;https://github.com/karthink/gptel?tab=readme-ov-file#model-context-protocol-mcp-integration&#34;&gt;このデモ&lt;/a&gt;を見ると使用イメージが分かりやすいです。&lt;/p&gt;</description>
    </item>
    <item>
      <title>NixOSのエラー: Could not start dynamically linked executable の対処法についてのメモ</title>
      <link>https://blog.kaorubb.org/ja/posts/nixos-fix-could-not-start-dynamically-linked-executable/</link>
      <pubDate>Wed, 02 Jul 2025 11:16:00 +0900</pubDate>
      <guid>https://blog.kaorubb.org/ja/posts/nixos-fix-could-not-start-dynamically-linked-executable/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://blog.kaorubb.org/ja/posts/gpt-mcp-setup/&#34;&gt;別記事 &lt;code&gt;gpt.el&lt;/code&gt; &amp;amp; &lt;code&gt;mcp.el&lt;/code&gt; で整う emacs llm環境 -&amp;gt; &lt;code&gt;mcp.el&lt;/code&gt; の設定例&lt;/a&gt; にあるようにmcp.el で使ういくつかの mcp server の起動で &lt;code&gt;uvx&lt;/code&gt; を使用しているのですが、nixOS で最初に起動したときにエラーが出てしまいました。
解決方法と原因を Gemini に調べさせたので、メモしておきます。&lt;/p&gt;
&lt;h2 id=&#34;症状とエラーメッセージ&#34;&gt;症状とエラーメッセージ&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;*Mcp-Hub*&lt;/code&gt; buffer で &lt;code&gt;mcp-hub-view-log&lt;/code&gt; を確認すると、以下のエラーが出ていました:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;[&lt;/span&gt;stderr&lt;span style=&#34;color:#f92672&#34;&gt;]&lt;/span&gt;  Could not start dynamically linked executable: /home/bk/.cache/uv/archive-v0/unI5q9QapqXHm9fPXna4G/bin/python
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;[&lt;/span&gt;stderr&lt;span style=&#34;color:#f92672&#34;&gt;]&lt;/span&gt;  NixOS cannot run dynamically linked executables intended &lt;span style=&#34;color:#66d9ef&#34;&gt;for&lt;/span&gt; generic
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;[&lt;/span&gt;stderr&lt;span style=&#34;color:#f92672&#34;&gt;]&lt;/span&gt;  linux environments out of the box. For more information, see:
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;[&lt;/span&gt;stderr&lt;span style=&#34;color:#f92672&#34;&gt;]&lt;/span&gt;  https://nix.dev/permalink/stub-ld
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;[&lt;/span&gt;jsonrpc&lt;span style=&#34;color:#f92672&#34;&gt;]&lt;/span&gt; D&lt;span style=&#34;color:#f92672&#34;&gt;[&lt;/span&gt;14:56:49.461&lt;span style=&#34;color:#f92672&#34;&gt;]&lt;/span&gt; Connection state change: &lt;span style=&#34;color:#e6db74&#34;&gt;`&lt;/span&gt;exited abnormally with code &lt;span style=&#34;color:#ae81ff&#34;&gt;127&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&#34;解決策-nix-ld-を有効にする&#34;&gt;解決策：nix-ld を有効にする&lt;/h2&gt;
&lt;p&gt;nix conifguration で、以下を足したら直りました。&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
