summary refs log tree commit diff
path: root/pkgs/tools/filesystems/cryfs/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/tools/filesystems/cryfs/default.nix')
-rw-r--r--pkgs/tools/filesystems/cryfs/default.nix15
1 files changed, 10 insertions, 5 deletions
diff --git a/pkgs/tools/filesystems/cryfs/default.nix b/pkgs/tools/filesystems/cryfs/default.nix
index eec257c44b7..a0dc3124159 100644
--- a/pkgs/tools/filesystems/cryfs/default.nix
+++ b/pkgs/tools/filesystems/cryfs/default.nix
@@ -25,6 +25,9 @@ stdenv.mkDerivation rec {
       url = "https://gitweb.gentoo.org/repo/gentoo.git/plain/sys-fs/cryfs/files/cryfs-0.10.2-unbundle-libs.patch?id=192ac7421ddd4093125f4997898fb62e8a140a44";
       sha256 = "0hzss5rawcjrh8iqzc40w5yjhxdqya4gbg6dzap70180s50mahzs";
     })
+
+    # Backported from https://github.com/cryfs/cryfs/pull/378
+    ./use-macfuse.patch
   ];
 
   postPatch = ''
@@ -48,16 +51,18 @@ stdenv.mkDerivation rec {
 
   strictDeps = true;
 
-  buildInputs = [ boost cryptopp curl fuse openssl gtest ];
+  buildInputs = [ boost cryptopp curl fuse openssl ];
+
+  checkInputs = [ gtest ];
 
   cmakeFlags = [
     "-DCRYFS_UPDATE_CHECKS:BOOL=FALSE"
     "-DBoost_USE_STATIC_LIBS:BOOL=FALSE" # this option is case sensitive
     "-DUSE_SYSTEM_LIBS:BOOL=TRUE"
-    "-DBUILD_TESTING:BOOL=TRUE"
-  ];
+    "-DBUILD_TESTING:BOOL=${if doCheck then "TRUE" else "FALSE"}"
+  ] ++ lib.optional doCheck "-DCMAKE_PREFIX_PATH=${gtest.dev}/lib/cmake";
 
-  doCheck = (!stdenv.isDarwin); # Cryfs tests are broken on darwin
+  doCheck = true;
 
   checkPhase = ''
     # Skip CMakeFiles directory and tests depending on fuse (does not work well with sandboxing)
@@ -73,6 +78,6 @@ stdenv.mkDerivation rec {
     homepage    = "https://www.cryfs.org";
     license     = licenses.lgpl3;
     maintainers = with maintainers; [ peterhoeg c0bw3b ];
-    platforms   = with platforms; linux;
+    platforms   = platforms.unix;
   };
 }