From 1a1470534f84f23457931ef9e4305d71834881f9 Mon Sep 17 00:00:00 2001 From: Sridhar Ratnakumar Date: Tue, 21 Jan 2020 13:00:50 -0500 Subject: [PATCH] Use nix gitignore to speedup builds --- default.nix | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/default.nix b/default.nix index 97f7a45..d0aef57 100644 --- a/default.nix +++ b/default.nix @@ -2,10 +2,13 @@ let # Use https://howoldis.herokuapp.com/ to find the next hash to update nixpkgs to. # Look for the "Last updated" hash for the entry `nixpkgs-unstable` nixpkgsRev = "c438ce12a85"; + + inherit (import (builtins.fetchTarball "https://github.com/hercules-ci/gitignore/archive/7415c4f.tar.gz") { }) gitignoreSource; + ribRoot = gitignoreSource ./.; in { pkgs ? import (builtins.fetchTarball "https://github.com/nixos/nixpkgs/archive/${nixpkgsRev}.tar.gz") {} , compiler ? "default" -, root ? ./. +, root ? ribRoot , name ? "rib" , source-overrides ? {} , ... @@ -19,7 +22,7 @@ in pkgs.haskellPackages.developPackage { inherit root name; source-overrides = { - rib = ./.; + rib = ribRoot; clay = githubRepo "sebastiaanvisser/clay" "cc7729b"; megaparsec =