diff options
author | adisbladis <adis@blad.is> | 2017-10-13 23:29:20 +0800 |
---|---|---|
committer | adisbladis <adis@blad.is> | 2017-10-13 23:29:20 +0800 |
commit | 7a86e4cf0d15cd33cd742b1e15b329367ed8362d (patch) | |
tree | d39e72934aa5a5961d02f2d459b584d144f4b7a1 /pkgs/tools/filesystems/cryfs/default.nix | |
parent | 8efe90a3f45d0b3be2fa266c51875c1fd1dc0998 (diff) | |
download | nixpkgs-7a86e4cf0d15cd33cd742b1e15b329367ed8362d.tar nixpkgs-7a86e4cf0d15cd33cd742b1e15b329367ed8362d.tar.gz nixpkgs-7a86e4cf0d15cd33cd742b1e15b329367ed8362d.tar.bz2 nixpkgs-7a86e4cf0d15cd33cd742b1e15b329367ed8362d.tar.lz nixpkgs-7a86e4cf0d15cd33cd742b1e15b329367ed8362d.tar.xz nixpkgs-7a86e4cf0d15cd33cd742b1e15b329367ed8362d.tar.zst nixpkgs-7a86e4cf0d15cd33cd742b1e15b329367ed8362d.zip |
cryfs: Enable tests
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 5d5d23d4ed3..0469ad54eb1 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; |