nix: ignore local build artifacts in flake source

This commit is contained in:
cheerfulScumbag 2026-05-14 21:17:54 +01:00
parent 31f417db39
commit 2f733c9802

View file

@ -26,9 +26,14 @@ stdenv.mkDerivation {
pname = "mango";
version = "nightly";
src = builtins.path {
path = ../.;
name = "source";
src = lib.cleanSourceWith {
src = ../.;
filter =
path: type:
let
relPath = lib.removePrefix ((toString ../.) + "/") (toString path);
in
!(relPath == ".git" || lib.hasPrefix ".git/" relPath || relPath == "build" || lib.hasPrefix "build/" relPath);
};
mesonFlags = [