diff --git a/pkgs/development/libraries/zeroc-ice/default.nix b/pkgs/development/libraries/zeroc-ice/default.nix index 26a2ebf223fd..fcd836348556 100644 --- a/pkgs/development/libraries/zeroc-ice/default.nix +++ b/pkgs/development/libraries/zeroc-ice/default.nix @@ -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 = [ "srcs" ]; # no tests; they require network - enableParallelBuilding = true; outputs = [ "out" "bin" "dev" ]; + 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 [ + "Ice/udp" "Glacier2" "IceGrid/simple" "IceStorm" "IceDiscovery/simple" + ]; + # matches CONFIGS flag in makeFlagsArray + configFlag = optionalString cpp11 "--config=cpp11-shared"; + in '' + runHook preCheck + ${python3.interpreter} ./cpp/allTests.py ${configFlag} --rfilter='${concatStringsSep "|" brokenTests}' + runHook postCheck + ''; + postInstall = '' mkdir -p $bin $dev/share mv $out/bin $bin