`k2nix` proposal
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 20/100
- issue の種類
- 機能追加
- 明瞭さ
- 説明が足りない
- 活発さ
- 停滞
- 技術スタック
- cpp
調査の方向性
Start by reviewing issue #47 and the proposed kbuild design, including the .kbuild example and boilerplate Nix flake using dream2nix. Determine how kbuild should translate project and dependency declarations into a flake and how kbuild shell . should invoke the resulting development environment. Done means the design is specified well enough to implement and provides the listed K, plugin, solc, and secp256k1 dependencies.
索引モデルが issue の本文から書いたものです。
説明
Having investigated #47, it turns out that the nix provided clang/c++ binaries are specially wrapped to ignore system wide paths as suspected. This wiki gives a bit more detail https://nixos.wiki/wiki/C, see also https://nixos.wiki/wiki/FAQ/I_installed_a_library_but_my_compiler_is_not_finding_it._Why%3F. THe way nix does this is to wrap the binaries in a script which reads any additional includes from NIX_CFLAGS_COMPILE/NIX_LDFLAGS. When a nix derivation is added to the buildInputs, nix automagically adds the relevant includes/ from those derivation to these vars inside it's build environment. The same thing happens when we call nix develop inside the project (e.g. evm-semantics), i.e. nix provides a shell with the same set of evn vars set correctly for clang to find the necessary libraries.
Given that C/C++ has no package manager, I think this is a sensible decision, but it does pose a question of how to provide an environment for developing with K, which implicitly relies on clang for the llvm-backend. One option would be to just patch nix provided clang to either look at the system path or alternatively provide versions of clang with the relevant libraries included in its search path, as discussed previously. However, both approaches go somewhat counter to nix philosophy and more importantly, given the discussions around kbuild, I believe it would make more sense to instead design a kbuild YAML/TOML format which nix can consume to supply the extra dependencies various projects require. This way, users wouldn't have to drop into the full nix language for basic/pre-packaged scenarios. Using nix in conjunction with kbuild, we could leverage nix to not only build executables but also provide us with a deterministic developer shell, which is largely consistent across the various distros, thus not relying on any system wide tools.
Roughly speaking we could have a .kbuild file:
[project]
k = ">=5.3.0"
title = "evm-semantics"
version = "0.1.0"
[dependencies.k]
repo = "https://github.com/runtimeverification/k"
rev = "..."
[dependencies.blockchain-k-plugin]
repo = "https://github.com/runtimeverification/blockchain-k-plugin"
rev = "..."
[dependencies.secp256k1]
type = "nix"
[dependencies.runtime.solc]
type = "nix"
...
and a boilerplate nix flake
{
inputs = {
dream2nix.url = "github:nix-community/dream2nix";
};
outputs = {
self,
dream2nix,
} @ inp:
(dream2nix.lib.makeFlakeOutputs {
systems = ["x86_64-linux"];
config.projectRoot = ./.;
source = ./.;
projects = ./projects.toml;
});
}
where the .kbuild file would actually get translated by dream2nix into a flake via makeFlakeOutputs.
Then, calling something like kbuild shell . would simply call nix develop ., providing us with a shell with k, blockchain plugin, solc, secp256k1, etc.
- 主要言語
- Python
- スター
- 10
- フォーク
- 2
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
このプロジェクトの環境構築ファイルはまだ確認していません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
runtimeverification/kup のほかの issue
-
難易度 3/5 1〜2日 初心者へのやさしさ 52/100
runtimeverification/kup#149 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
runtimeverification/kup#138 ·
-
Update `kup list` to show nicer and shorter version strings again再び着手できるかも @juliankuners が 426 日前に担当しましたが、オープン中のプルリクエストはありません。 オープン
runtimeverification/kup#137 · コメント 1 件 · 担当者 1 名 ·
-
Add more Nix versions to test CI workflow再び着手できるかも @juliankuners が 426 日前に担当しましたが、オープン中のプルリクエストはありません。 オープン
runtimeverification/kup#136 · 担当者 1 名 ·
-
Kup fails to uninstall nix profile packages by index on new nix and nix manifest versions再び着手できるかも @juliankuners が 426 日前に担当しましたが、オープン中のプルリクエストはありません。 オープン
runtimeverification/kup#135 · 担当者 1 名 ·
runtimeverification/kup の issue をすべて見る
似ている issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 72/100
letsencrypt/cp-cps#353 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
PedestrianDynamics/pyFDS-Evac#394 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
DOI-USGS/pywatershed#421 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
python-pillow/Pillow#10087 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信