diff --git a/nix/derivation-bpf.nix b/nix/derivation-bpf.nix index b02091a07f..e9389f5513 100644 --- a/nix/derivation-bpf.nix +++ b/nix/derivation-bpf.nix @@ -1,7 +1,8 @@ { pkgs, buildGoModule, arch ? "x86" }: with pkgs; buildGo122Module rec { name = "security-profiles-operator"; - src = ./..; + # Use Pure to avoid exuding the .git directory + src = nix-gitignore.gitignoreSourcePure [ ../.gitignore ] ./..; vendorHash = null; doCheck = false; outputs = [ "out" ]; diff --git a/nix/derivation.nix b/nix/derivation.nix index 19e047a938..ebe59f93ab 100644 --- a/nix/derivation.nix +++ b/nix/derivation.nix @@ -1,7 +1,8 @@ { pkgs, buildGoModule }: with pkgs; buildGo122Module rec { name = "security-profiles-operator"; - src = ./..; + # Use Pure to avoid exuding the .git directory + src = nix-gitignore.gitignoreSourcePure [ ../.gitignore ] ./..; vendorHash = null; doCheck = false; outputs = [ "out" ];