From a5d820beb16369313da264b8441014a297735e1d Mon Sep 17 00:00:00 2001 From: Andreas Rammhold Date: Sun, 8 Oct 2017 19:12:32 +0200 Subject: irods: remove unused attribute `propagateBuildInputs` (missing d) --- pkgs/tools/filesystems/irods/common.nix | 2 -- pkgs/tools/filesystems/irods/default.nix | 2 -- 2 files changed, 4 deletions(-) (limited to 'pkgs/tools/filesystems') diff --git a/pkgs/tools/filesystems/irods/common.nix b/pkgs/tools/filesystems/irods/common.nix index 9c5412ddef7c..c7267aca1071 100644 --- a/pkgs/tools/filesystems/irods/common.nix +++ b/pkgs/tools/filesystems/irods/common.nix @@ -9,8 +9,6 @@ with stdenv; buildInputs = [ bzip2 zlib autoconf automake cmake gnumake help2man texinfo libtool cppzmq libarchive avro-cpp jansson zeromq openssl pam libiodbc kerberos gcc boost libcxx which ]; - propagateBuildInputs = [ boost ]; - cmakeFlags = [ "-DIRODS_EXTERNALS_FULLPATH_CLANG=${stdenv.cc}" "-DIRODS_EXTERNALS_FULLPATH_CLANG_RUNTIME=${stdenv.cc}" diff --git a/pkgs/tools/filesystems/irods/default.nix b/pkgs/tools/filesystems/irods/default.nix index 0714f2901046..523028f5fb2e 100644 --- a/pkgs/tools/filesystems/irods/default.nix +++ b/pkgs/tools/filesystems/irods/default.nix @@ -62,8 +62,6 @@ in rec { buildInputs = common.buildInputs ++ [ irods ]; - propagateBuildInputs = [ boost ]; - preConfigure = common.preConfigure + '' patchShebangs ./bin ''; -- cgit 1.4.1 From 515ea69f098432e20d07f9b72c530b22344dfe61 Mon Sep 17 00:00:00 2001 From: Peter Hoeg Date: Thu, 12 Oct 2017 12:41:05 +0800 Subject: cryfs: init at 0.9.7 --- pkgs/tools/filesystems/cryfs/default.nix | 58 ++++++++++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 60 insertions(+) create mode 100644 pkgs/tools/filesystems/cryfs/default.nix (limited to 'pkgs/tools/filesystems') diff --git a/pkgs/tools/filesystems/cryfs/default.nix b/pkgs/tools/filesystems/cryfs/default.nix new file mode 100644 index 000000000000..07b077b9289c --- /dev/null +++ b/pkgs/tools/filesystems/cryfs/default.nix @@ -0,0 +1,58 @@ +{ stdenv, fetchFromGitHub +, cmake, pkgconfig, coreutils +, boost, cryptopp, curl, fuse, openssl, python, spdlog +}: + +stdenv.mkDerivation rec { + name = "cryfs-${version}"; + version = "0.9.7"; + + src = fetchFromGitHub { + owner = "cryfs"; + repo = "cryfs"; + rev = "${version}"; + sha256 = "1wsv4cyjkyg3cyr6vipw1mj41bln2m69123l3miav8r4mvmkfq8w"; + }; + + prePatch = '' + patchShebangs src + + substituteInPlace vendor/scrypt/CMakeLists.txt \ + --replace /usr/bin/ "" + + # scrypt in nixpkgs only produces a binary so we lift the patching from that so allow + # building the vendored version. This is very much NOT DRY. + # The proper solution is to have scrypt generate a dev output with the required files and just symlink + # into vendor/scrypt + for f in Makefile.in autocrap/Makefile.am libcperciva/cpusupport/Build/cpusupport.sh ; do + substituteInPlace vendor/scrypt/scrypt-*/scrypt/$f --replace "command -p " "" + done + + # cryfs is vendoring an old version of spdlog + rm -rf vendor/spdlog/spdlog + ln -s ${spdlog} vendor/spdlog/spdlog + ''; + + buildInputs = [ boost cryptopp curl fuse openssl python spdlog ]; + + # coreutils is needed for the vendored scrypt + nativeBuildInputs = [ cmake coreutils pkgconfig ]; + + enableParallelBuilding = true; + + cmakeFlags = [ + "-DCRYFS_UPDATE_CHECKS=OFF" + "-DBoost_USE_STATIC_LIBS=OFF" # this option is case sensitive + "-DBUILD_TESTING=ON" + ]; + + doCheck = true; + + meta = with stdenv.lib; { + description = "Cryptographic filesystem for the cloud"; + homepage = https://www.cryfs.org; + license = licenses.lgpl3; + maintainers = with maintainers; [ peterhoeg ]; + platforms = with platforms; linux; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 8582966e81dc..8525b7b2c74c 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1881,6 +1881,8 @@ with pkgs; enblend-enfuse = callPackage ../tools/graphics/enblend-enfuse { }; + cryfs = callPackage ../tools/filesystems/cryfs { }; + encfs = callPackage ../tools/filesystems/encfs { tinyxml2 = tinyxml-2; }; -- cgit 1.4.1 From 00078afb1f6c383405fa4bef9646d575f70b092f Mon Sep 17 00:00:00 2001 From: Tuomas Tynkkynen Date: Thu, 12 Oct 2017 20:35:33 +0300 Subject: f2fs-tools: 1.8.0 -> 1.9.0 --- pkgs/tools/filesystems/f2fs-tools/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'pkgs/tools/filesystems') diff --git a/pkgs/tools/filesystems/f2fs-tools/default.nix b/pkgs/tools/filesystems/f2fs-tools/default.nix index fdad877d34cf..53b17f45f9f4 100644 --- a/pkgs/tools/filesystems/f2fs-tools/default.nix +++ b/pkgs/tools/filesystems/f2fs-tools/default.nix @@ -2,12 +2,12 @@ stdenv.mkDerivation rec { name = "f2fs-tools-${version}"; - version = "1.8.0"; + version = "1.9.0"; src = fetchgit { url = "git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs-tools.git"; rev = "refs/tags/v${version}"; - sha256 = "0mbpg6mng6jcm5vxq0ivhklgpkwvjbhjwgkhzxr50ln46h5kbd2f"; + sha256 = "0aj9dbhv7vv19pyb2rhcg99v5v0s66sb9yzrdmi46bmvzz124pal"; }; nativeBuildInputs = [ autoreconfHook pkgconfig ]; -- cgit 1.4.1 From ea1a925a95493e5e3122f0bb714d7b5f1392265a Mon Sep 17 00:00:00 2001 From: Peter Hoeg Date: Fri, 13 Oct 2017 20:49:54 +0800 Subject: cryfs: disable testing as it does not work - I pushed the wrong branch earlier --- pkgs/tools/filesystems/cryfs/default.nix | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'pkgs/tools/filesystems') diff --git a/pkgs/tools/filesystems/cryfs/default.nix b/pkgs/tools/filesystems/cryfs/default.nix index 07b077b9289c..5d5d23d4ed3e 100644 --- a/pkgs/tools/filesystems/cryfs/default.nix +++ b/pkgs/tools/filesystems/cryfs/default.nix @@ -43,11 +43,9 @@ stdenv.mkDerivation rec { cmakeFlags = [ "-DCRYFS_UPDATE_CHECKS=OFF" "-DBoost_USE_STATIC_LIBS=OFF" # this option is case sensitive - "-DBUILD_TESTING=ON" + "-DBUILD_TESTING=OFF" ]; - doCheck = true; - meta = with stdenv.lib; { description = "Cryptographic filesystem for the cloud"; homepage = https://www.cryfs.org; -- cgit 1.4.1 From 7a86e4cf0d15cd33cd742b1e15b329367ed8362d Mon Sep 17 00:00:00 2001 From: adisbladis Date: Fri, 13 Oct 2017 23:29:20 +0800 Subject: cryfs: Enable tests --- pkgs/tools/filesystems/cryfs/default.nix | 25 +++++++++++++++- .../cryfs/skip-failing-test-large-malloc.patch | 34 ++++++++++++++++++++++ pkgs/tools/filesystems/cryfs/test-no-network.patch | 24 +++++++++++++++ 3 files changed, 82 insertions(+), 1 deletion(-) create mode 100644 pkgs/tools/filesystems/cryfs/skip-failing-test-large-malloc.patch create mode 100644 pkgs/tools/filesystems/cryfs/test-no-network.patch (limited to 'pkgs/tools/filesystems') 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; diff --git a/pkgs/tools/filesystems/cryfs/skip-failing-test-large-malloc.patch b/pkgs/tools/filesystems/cryfs/skip-failing-test-large-malloc.patch new file mode 100644 index 000000000000..feb0ed9cfbb9 --- /dev/null +++ b/pkgs/tools/filesystems/cryfs/skip-failing-test-large-malloc.patch @@ -0,0 +1,34 @@ +From ad3f7e9fa2dececfaab43963887a2f03de52d659 Mon Sep 17 00:00:00 2001 +From: adisbladis +Date: Thu, 12 Oct 2017 21:45:26 +0800 +Subject: [PATCH] Skip failing test: large malloc + +--- + test/cpp-utils/data/DataTest.cpp | 11 ----------- + 1 file changed, 11 deletions(-) + +diff --git a/test/cpp-utils/data/DataTest.cpp b/test/cpp-utils/data/DataTest.cpp +index 6f9df070..bd426e62 100644 +--- a/test/cpp-utils/data/DataTest.cpp ++++ b/test/cpp-utils/data/DataTest.cpp +@@ -191,17 +191,6 @@ TEST_F(DataTest, Inequality_DifferentLastByte) { + EXPECT_TRUE(data1 != data2); + } + +-#ifdef __x86_64__ +-TEST_F(DataTest, LargesizeSize) { +- //Needs 64bit for representation. This value isn't in the size param list, because the list is also used for read/write checks. +- uint64_t size = 4.5L*1024*1024*1024; +- Data data(size); +- EXPECT_EQ(size, data.size()); +-} +-#else +-#warning This is not a 64bit architecture. Large size data tests are disabled. +-#endif +- + TEST_F(DataTest, LoadingNonexistingFile) { + TempFile file(false); // Pass false to constructor, so the tempfile is not created + EXPECT_FALSE(Data::LoadFromFile(file.path())); +-- +2.14.2 + diff --git a/pkgs/tools/filesystems/cryfs/test-no-network.patch b/pkgs/tools/filesystems/cryfs/test-no-network.patch new file mode 100644 index 000000000000..3392d3f855ec --- /dev/null +++ b/pkgs/tools/filesystems/cryfs/test-no-network.patch @@ -0,0 +1,24 @@ +From 8b1808e1278d2cb0dc56a4e98781eceeadfb9718 Mon Sep 17 00:00:00 2001 +From: adisbladis +Date: Thu, 12 Oct 2017 18:13:28 +0800 +Subject: [PATCH] Disable tests using external networking + +--- + test/cpp-utils/CMakeLists.txt | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/test/cpp-utils/CMakeLists.txt b/test/cpp-utils/CMakeLists.txt +index 5a2bc9f8..d838edba 100644 +--- a/test/cpp-utils/CMakeLists.txt ++++ b/test/cpp-utils/CMakeLists.txt +@@ -20,7 +20,6 @@ set(SOURCES + tempfile/TempFileIncludeTest.cpp + tempfile/TempDirIncludeTest.cpp + tempfile/TempDirTest.cpp +- network/CurlHttpClientTest.cpp + network/FakeHttpClientTest.cpp + io/ConsoleIncludeTest.cpp + io/ConsoleTest_AskYesNo.cpp +-- +2.14.2 + -- cgit 1.4.1