From cb112954051829a2872bb82d3d13441faf45172a Mon Sep 17 00:00:00 2001 From: Alexander Bantyev Date: Mon, 8 Jun 2020 14:41:23 +0300 Subject: [PATCH 1/2] Add nix artifacts to gitignore --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index 7c9d772a8..344feff64 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,8 @@ *.merlin cache/* Version.ml +/result +/result-* /_opam/ /*.pp.ligo /*.pp.mligo From 046f31f7c1ffb88d89d9687f73170d644898ec60 Mon Sep 17 00:00:00 2001 From: Alexander Bantyev Date: Mon, 8 Jun 2020 14:50:51 +0300 Subject: [PATCH 2/2] Nix: apply gitignore on sources --- nix/ocaml-overlay.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/nix/ocaml-overlay.nix b/nix/ocaml-overlay.nix index 8dd971e79..4ff46b20b 100644 --- a/nix/ocaml-overlay.nix +++ b/nix/ocaml-overlay.nix @@ -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 (_: _: { }) [