cryfs: init at 0.9.7

This commit is contained in:
Peter Hoeg 2017-10-12 12:41:05 +08:00
parent b551054917
commit 515ea69f09
2 changed files with 60 additions and 0 deletions

View file

@ -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;
};
}

View file

@ -1881,6 +1881,8 @@ with pkgs;
enblend-enfuse = callPackage ../tools/graphics/enblend-enfuse { }; enblend-enfuse = callPackage ../tools/graphics/enblend-enfuse { };
cryfs = callPackage ../tools/filesystems/cryfs { };
encfs = callPackage ../tools/filesystems/encfs { encfs = callPackage ../tools/filesystems/encfs {
tinyxml2 = tinyxml-2; tinyxml2 = tinyxml-2;
}; };