Setting LD_LIBRARY_PATH for Nix dev shells might be bad advice

オープン
#6,331 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
28/100
issue の種類
ドキュメント
明瞭さ
説明が足りない
活発さ
停滞
技術スタック
haskell, nixos
領域
documentation

調査の方向性

リンクされたドキュメントページの Supporting both Nix and non-Nix developers セクションから始め、報告されている devShell、nix develop、direnv の相互作用を再現してください。LD_LIBRARY_PATH に関する案内と、--extra-lib-dirs および --extra-include-dirs を使う提案された方法を調査してください。ドキュメントが無関係なツールを壊すセットアップを推奨しなくなり、検証済みの代替方法を説明していれば完了です。

索引モデルが issue の本文から書いたものです。

説明

component: nix
Location of the documentation

https://docs.haskellstack.org/en/stable/nix_integration/#supporting-both-nix-and-non-nix-developers

Is it inaccurate?

I currently have a devShell in a flake.nix defined along the lines of the docs linked above. This works well for building and running the project, but interacts poorly with nix develop and direnv: tools not specified in the devshell will break because of libc version mismatches. For example, the devshell puts openssl in LD_LIBRARY_PATH, but this breaks tools which (indirectly) depend on it like git fetch, which will fail with a dynamic linking error like

/home/${USER}/.nix-profile/bin/ssh: /nix/store/vq3sdi8l15rzfl5zvmwpafrzis4sm6xf-glibc-2.37-8/lib/libc.so.6: version `GLIBC_2.38' not found (required by /nix/store/vzajrlhsdv2d39s7v6zv09ggajs05gwj-openssl-3.0.11/lib/libcrypto.so.3)

(My ssh happens to be installed via Nix, but I've also seen it happen with Ubuntu's own /usr/bin/ssh.)

Is it incomplete?

There's probably a better way to do things. I don't know if the old-fashioned approach using haskell.lib.buildStackProject has the same issue. It ought to be possible to set up things with --extra-lib-dirs and --extra-include-dirs instead, but I haven't gotten this to work myself yet and I suspect that would actually just be duplicating the functionality of buildStackProject.

主要言語
Haskell
スター
4.1k
フォーク
857
平均マージ
17時間 32分
マージ済み PR(30日)
5

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

commercialhaskell/stack のほかの issue

commercialhaskell/stack の issue をすべて見る

似ている issue

Haskell の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。