You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Git >= 2.35.2 (in nixos-24.05) introduced the safe.directory config, whose default does not include /nix/store which breaks the current way haskell.nix builds a plan from a cabal.project containing any source-repository-package.
$ nix -L developwarning: Git tree '/home/julm/src/haskell/test' is dirtyhello-plan-to-nix-pkgs> Cloning into '/build/tmp.TxdNINpb2z/dist-newstyle/src/ha5dggbjg_-7741b382fc456db6'...hello-plan-to-nix-pkgs> fatal: detected dubious ownership in repository at '/nix/store/ha5dggbjg5xpv7czx6z5mbbyfib2fzzr-source-repository-package/.git'hello-plan-to-nix-pkgs> To add an exception for this directory, call:hello-plan-to-nix-pkgs> git config --global --add safe.directory /nix/store/ha5dggbjg5xpv7czx6z5mbbyfib2fzzr-source-repository-package/.githello-plan-to-nix-pkgs> fatal: Could not read from remote repository.hello-plan-to-nix-pkgs> Please make sure you have the correct access rightshello-plan-to-nix-pkgs> and the repository exists.error: … while evaluating the attribute 'packages' at /nix/store/3zp53n4295fv7l09518szwhma2wsxan1-source/lib/default.nix:396:7: 395| inherit name; 396| value = | ^ 397| # This favours the first item (`a`) in the case of duplicates … in the left operand of the update (//) operator at /nix/store/3zp53n4295fv7l09518szwhma2wsxan1-source/lib/default.nix:403:29: 402| else 403| (b.${name} or {}) // (a.${name} or {}); | ^ 404| }) (__attrNames (a // b))); (stack trace truncated; use '--show-trace' to show the full trace) error: builder for '/nix/store/15bh9y7wbwl5hz71xp34wxbqjgfssfyv-hello-plan-to-nix-pkgs.drv' failed with exit code 128; last 9 log lines: > Cloning into '/build/tmp.TxdNINpb2z/dist-newstyle/src/ha5dggbjg_-7741b382fc456db6'... > fatal: detected dubious ownership in repository at '/nix/store/ha5dggbjg5xpv7czx6z5mbbyfib2fzzr-source-repository-package/.git' > To add an exception for this directory, call: > > git config --global --add safe.directory /nix/store/ha5dggbjg5xpv7czx6z5mbbyfib2fzzr-source-repository-package/.git > fatal: Could not read from remote repository. > > Please make sure you have the correct access rights > and the repository exists. For full logs, run 'nix log /nix/store/15bh9y7wbwl5hz71xp34wxbqjgfssfyv-hello-plan-to-nix-pkgs.drv'.
Bonus points if it is in a PR to add a test case.
Expected behavior
Plan builds as well as it did with git < 2.35.2 without globally adding the whole /nix/store as a safe.directory.
Additional context
The text was updated successfully, but these errors were encountered:
Describe the bug
Git >= 2.35.2 (in nixos-24.05) introduced the
safe.directory
config, whose default does not include/nix/store
which breaks the current wayhaskell.nix
builds a plan from acabal.project
containing anysource-repository-package
.Steps To Reproduce
cabal.project
:flake.nix
:Bonus points if it is in a PR to add a test case.
Expected behavior
Plan builds as well as it did with git < 2.35.2 without globally adding the whole
/nix/store
as asafe.directory
.Additional context
The text was updated successfully, but these errors were encountered: