@ -1,6 +1,7 @@
{ stdenv , lib , fetchFromGitHub
, bzip2 , expat , libedit , lmdb , openssl
, darwin , libiconv , Security
, python3 # for tests only
, cpp11 ? false
} :
@ -52,12 +53,25 @@ in stdenv.mkDerivation rec {
)
'' ;
buildFlags = [ " s r c s " ] ; # no tests; they require network
enableParallelBuilding = true ;
outputs = [ " o u t " " b i n " " d e v " ] ;
doCheck = true ;
checkInputs = with python3 . pkgs ; [ passlib ] ;
checkPhase = with lib ; let
# these tests require network access so we need to skip them.
brokenTests = map escapeRegex [
" I c e / u d p " " G l a c i e r 2 " " I c e G r i d / s i m p l e " " I c e S t o r m " " I c e D i s c o v e r y / s i m p l e "
] ;
# matches CONFIGS flag in makeFlagsArray
configFlag = optionalString cpp11 " - - c o n f i g = c p p 1 1 - s h a r e d " ;
in ''
runHook preCheck
$ { python3 . interpreter } ./cpp/allTests.py $ { configFlag } - - rfilter = ' $ { concatStringsSep " | " brokenTests } '
runHook postCheck
'' ;
postInstall = ''
mkdir - p $ bin $ dev/share
mv $ out/bin $ bin