Skip to content

Commit

Permalink
Set safe.directory=*
Browse files Browse the repository at this point in the history
  • Loading branch information
nlewo committed Jun 27, 2024
1 parent 19861ff commit 5a8bddd
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,15 @@
import ./nix/module-options-doc.nix (nixpkgsFor."${system}")
);
in {
overlays.default = final: prev: {
overlays.default = final: prev: let
gitConfigFile = final.writeTextFile {
name = "git.config";
text = ''
[safe]
directory = *
'';
};
in {
comin = final.buildGoModule rec {
pname = "comin";
version = "0.2.0";
Expand All @@ -35,7 +43,7 @@
buildInputs = [ final.makeWrapper ];
postInstall = ''
# This is because Nix needs Git at runtime by the go-git library
wrapProgram $out/bin/comin --prefix PATH : ${final.git}/bin
wrapProgram $out/bin/comin --set GIT_CONFIG_SYSTEM ${gitConfigFile} --prefix PATH : ${final.git}/bin
'';
};
};
Expand Down

0 comments on commit 5a8bddd

Please sign in to comment.