2020-01-21 07:19:49 +00:00
{ config , stdenv , callPackage , fetchFromGitHub , mkFilter }:
let
inherit ( stdenv . lib ) attrByPath strings traceValFn ;
repo = " n i m b u s " ;
localPath = attrByPath [ " s t a t u s - i m " " n i m b u s " " s r c - o v e r r i d e " ] " " config ;
localSrc = builtins . path rec { # We use builtins.path so that we can name the resulting derivation, otherwise the name would be taken from the checkout directory, which is outside of our control
path = traceValFn ( path : " U s i n g l o c a l ${ repo } s o u r c e s f r o m ${ path } \n " ) localPath ;
name = " ${ repo } - s o u r c e - l o c a l " ;
filter =
# Keep this filter as restrictive as possible in order to avoid unnecessary rebuilds and limit closure size
mkFilter {
dirRootsToInclude = [ " n i x " " w r a p p e r s " " v e n d o r " ] ;
dirsToExclude = [ " . g i t " " . s v n " " C V S " " . h g " " . v s c o d e " " . d e p e n d a b o t " " . g i t h u b " " e x a m p l e s " " d o c s " ] ;
filesToInclude = [ " M a k e f i l e " " n i m . c f g " " n i m b u s . n i m b l e " " d e f a u l t . n i x " ] ;
root = path ;
} ;
} ;
src = if localPath != " " then localSrc
else fetchFromGitHub rec {
inherit repo ;
name = " ${ repo } - s o u r c e - ${ strings . substring 0 7 rev } " ;
2020-01-21 09:28:50 +00:00
rev = " 7 3 2 7 8 f 2 0 d 0 b f 2 7 f b 7 c 6 c 3 3 1 b 5 1 5 a b b 7 6 5 8 1 4 f 1 c c " ;
2020-01-21 07:19:49 +00:00
owner = " s t a t u s - i m " ;
2020-01-21 09:28:50 +00:00
sha256 = " 0 m y q 2 3 4 z q n p m q s c 2 4 5 2 x y g n y c 6 s j s 8 x 1 b l y r p a 4 b i 9 v 2 c w b y a p 5 c " ;
2020-01-21 07:19:49 +00:00
fetchSubmodules = true ;
} ;
nimbusDeriv = import " ${ src } / n i x / d e f a u l t . n i x " ;
in nimbusDeriv