3
0
Fork 0
forked from mirrors/nixpkgs

lib.cleanSource: ignore sockets

I'm working on a project that involves running a virtual machine
monitor program, which creates a control socket in the project
directory (because it doesn't make sense to put it anywhere else).
This obviously isn't part of the source of my program, so I think
cleanSource should filter it out.
This commit is contained in:
Alyssa Ross 2021-09-17 09:59:37 +00:00
parent d4f282e393
commit f446318916
No known key found for this signature in database
GPG key ID: F9DBED4859B271C0

View file

@ -43,7 +43,9 @@ let
lib.hasSuffix ".o" baseName ||
lib.hasSuffix ".so" baseName ||
# Filter out nix-build result symlinks
(type == "symlink" && lib.hasPrefix "result" baseName)
(type == "symlink" && lib.hasPrefix "result" baseName) ||
# Filter out sockets and other types of files we can't have in the store.
(type == "unknown")
);
# Filters a source tree removing version control files and directories using cleanSourceWith