diff options
Diffstat (limited to 'pkgs/tools/filesystems/cryfs/default.nix')
-rw-r--r-- | pkgs/tools/filesystems/cryfs/default.nix | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/pkgs/tools/filesystems/cryfs/default.nix b/pkgs/tools/filesystems/cryfs/default.nix index 5d5d23d4ed3e..0469ad54eb13 100644 --- a/pkgs/tools/filesystems/cryfs/default.nix +++ b/pkgs/tools/filesystems/cryfs/default.nix @@ -35,6 +35,11 @@ stdenv.mkDerivation rec { buildInputs = [ boost cryptopp curl fuse openssl python spdlog ]; + patches = [ + ./test-no-network.patch # Disable tests using external networking + ./skip-failing-test-large-malloc.patch + ]; + # coreutils is needed for the vendored scrypt nativeBuildInputs = [ cmake coreutils pkgconfig ]; @@ -43,9 +48,27 @@ stdenv.mkDerivation rec { cmakeFlags = [ "-DCRYFS_UPDATE_CHECKS=OFF" "-DBoost_USE_STATIC_LIBS=OFF" # this option is case sensitive - "-DBUILD_TESTING=OFF" + "-DBUILD_TESTING=ON" ]; + doCheck = true; + + # Cryfs tests are broken on darwin + checkPhase = stdenv.lib.optionalString (!stdenv.isDarwin) '' + # Skip CMakeFiles directory and tests depending on fuse (does not work well with sandboxing) + SKIP_IMPURE_TESTS="CMakeFiles|fspp|cryfs-cli" + + for test in `ls -d test/*/ | egrep -v "$SKIP_IMPURE_TESTS"`; do + "./$test`basename $test`-test" + done + ''; + + installPhase = '' + # Building with BUILD_TESTING=ON is missing the install target + mkdir -p $out/bin + install -m 755 ./src/cryfs-cli/cryfs $out/bin/cryfs + ''; + meta = with stdenv.lib; { description = "Cryptographic filesystem for the cloud"; homepage = https://www.cryfs.org; |