mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-27 05:43:50 +03:00
parent
80ec5b3f58
commit
402c07c563
@ -12,8 +12,7 @@ rec {
|
|||||||
|
|
||||||
# Bring in a path as a source, filtering out all Subversion and CVS
|
# Bring in a path as a source, filtering out all Subversion and CVS
|
||||||
# directories, as well as backup files (*~).
|
# directories, as well as backup files (*~).
|
||||||
cleanSource =
|
cleanSourceFilter = name: type: let baseName = baseNameOf (toString name); in ! (
|
||||||
let filter = name: type: let baseName = baseNameOf (toString name); in ! (
|
|
||||||
# Filter out Subversion and CVS directories.
|
# Filter out Subversion and CVS directories.
|
||||||
(type == "directory" && (baseName == ".git" || baseName == ".svn" || baseName == "CVS" || baseName == ".hg")) ||
|
(type == "directory" && (baseName == ".git" || baseName == ".svn" || baseName == "CVS" || baseName == ".hg")) ||
|
||||||
# Filter out backup files.
|
# Filter out backup files.
|
||||||
@ -24,7 +23,8 @@ rec {
|
|||||||
# Filter out nix-build result symlinks
|
# Filter out nix-build result symlinks
|
||||||
(type == "symlink" && lib.hasPrefix "result" baseName)
|
(type == "symlink" && lib.hasPrefix "result" baseName)
|
||||||
);
|
);
|
||||||
in src: builtins.filterSource filter src;
|
|
||||||
|
cleanSource = builtins.filterSource cleanSourceFilter;
|
||||||
|
|
||||||
|
|
||||||
# Get all files ending with the specified suffices from the given
|
# Get all files ending with the specified suffices from the given
|
||||||
|
Loading…
Reference in New Issue
Block a user