nixpkgsで新しい `pythonOutputDistHook`を使う方法は?

nixpkgsで新しい `pythonOutputDistHook`を使う方法は?

私はプロジェクトを完了するためにいくつかの方法を試しました。result-distPyPIに公開できるホイール付きフォルダの作成。どういうわけかnixpkgsバージョンを使用していますが、pythonOutputDistHookその中には、フォルダではなくresultフォルダのみが表示されますresult-dist

これまで私が調査した内容は次のとおりです。

  1. pythonOutputDistHookオプションであり、に基づいていますwithDistOutput

  2. withDistOutputformat次のいずれかが含まれている場合は真です["pyproject" "setuptools" "flit"]

  3. format ? "setuptools"私のコードが設定されていないので、format含める必要pythonOutputDistHookがあります。

  4. pythonOutputDistHook含まれていることを確認しました。私のニックス包装:

    $ cd nixpkgs
    $ git checkout 9c14978f845f33b152f722709caf42148580a30c
    HEAD is now at 9c14978f845 Merge master into staging-next
    $ git grep pythonOutputDistHook
    pkgs/development/interpreters/python/hooks/default.nix:  pythonOutputDistHook = callPackage ({ }:
    pkgs/development/interpreters/python/mk-python-derivation.nix:, pythonOutputDistHook
    pkgs/development/interpreters/python/mk-python-derivation.nix:      pythonOutputDistHook
    pkgs/top-level/python-packages.nix:    pythonOutputDistHook
    

pkgsNixファイルの1つに別のパラメータを注入することはありますか?

ベストアンサー1

Nixpkgs( ) の標準ビルダーはstdenv.mkDerivation複数の出力を生成できます。いくつかの一般的な出力は基本出力ですが、ともoutあります。すべての派生物は生成される出力を指定できます。出力を直接参照できます。libbindevdoc

$ nix-build -A bash.dev
/nix/store/pji7665awsg1fcp2irhnfm3508lvsgh0-bash-5.1-p16-dev

最近、(buildPythonPackageビハインドシーンと呼ばれる)展開用のアーティファクト、特にホイールを含む出力を生成しました。stdenv.mkDerivationdist

$ find $(nix-build -A python3.pkgs.pytest.dist)
/nix/store/flg6ahbbmppq5vpjcxdhzs9fz7dx86vq-python3.10-pytest-7.1.3-dist
/nix/store/flg6ahbbmppq5vpjcxdhzs9fz7dx86vq-python3.10-pytest-7.1.3-dist/pytest-7.1.3-py3-none-any.whl

おすすめ記事