Nix: apply gitignore on sources

This commit is contained in:
Alexander Bantyev 2020-06-08 14:50:51 +03:00
parent cb11295405
commit 046f31f7c1
Signed by: balsoft
GPG Key ID: E081FF12ADCB4AD5

View File

@ -9,11 +9,12 @@ let
inherit (import sources."gitignore.nix" { inherit (self) lib; })
gitignoreSource;
# Remove list of directories or files from source (to stop unneeded rebuilds)
# Also, apply the gitignore here.
filterOut = xs:
self.lib.cleanSourceWith {
gitignoreSource (self.lib.cleanSourceWith {
filter = p: type: !(builtins.elem (builtins.baseNameOf p) xs);
src = gitignoreSource ../.;
};
});
in {
ocamlPackages = self.ocaml-ng.ocamlPackages_4_07.overrideScope'
(builtins.foldl' self.lib.composeExtensions (_: _: { }) [