Skip to content

Commit cc657c2

Browse files
committed
Use .gitignore in nix build excludes
This avoid building with wrong pre-built data locally as well as in CI. Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
1 parent f8854e8 commit cc657c2

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

nix/derivation-bpf.nix

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
{ pkgs, buildGoModule, arch ? "x86" }:
22
with pkgs; buildGo122Module rec {
33
name = "security-profiles-operator";
4-
src = ./..;
4+
# Use Pure to avoid exuding the .git directory
5+
src = nix-gitignore.gitignoreSourcePure [ ../.gitignore ] ./..;
56
vendorHash = null;
67
doCheck = false;
78
outputs = [ "out" ];

nix/derivation.nix

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
{ pkgs, buildGoModule }:
22
with pkgs; buildGo122Module rec {
33
name = "security-profiles-operator";
4-
src = ./..;
4+
# Use Pure to avoid exuding the .git directory
5+
src = nix-gitignore.gitignoreSourcePure [ ../.gitignore ] ./..;
56
vendorHash = null;
67
doCheck = false;
78
outputs = [ "out" ];

0 commit comments

Comments
 (0)