Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save ThinaticSystem/8b0be7fdb98f59ee3b16a48bcc19267c to your computer and use it in GitHub Desktop.

Select an option

Save ThinaticSystem/8b0be7fdb98f59ee3b16a48bcc19267c to your computer and use it in GitHub Desktop.
Nix 2.28.5では nix flake {subcommand} . がreftableなGitリポジトリー( extensions.refstorage=reftable )で失敗する場合がある。回避策としてflake-urlを path: で指定する(e.g. nix flake show path:.)。
title Nixの評価がref-format: reftableなGitリポジトリーで失敗する
description Nix 2.28.5では nix flake {subcommand} . がreftableなGitリポジトリー( extensions.refstorage=reftable )で失敗する場合がある。回避策としてflake-urlを path: で指定する(e.g. nix flake show path:.)。
tags
troubleshooting
nix
git
reftable
ref-format
ref-storage

Nixの評価が ref-format: reftable なGitリポジトリーで失敗する

事象

$ nix flake show .
error:
       … while fetching the input 'git+file:///home/ts/repo/_template/template-nix'

       error: opening Git repository "/home/ts/repo/_template/template-nix": unsupported extension name extensions.refstorage

原因

Nix 2.28.5時点のGit fetcherはref-formatがreftableのGitリポジトリーをサポートしていない
そのため、Git URLを使用(.)してリポジトリーのflakeを評価する際にエラーとなる

回避策

git URL(.)ではなく、path(path:.)を使ってflakeを評価する

e.g.

$ nix flake show path:.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment