From d256057b2c76ff92b248e924e826b4c1ffacfe65 Mon Sep 17 00:00:00 2001 From: Peter Hoeg Date: Thu, 12 Oct 2017 12:40:12 +0800 Subject: [PATCH 1/4] spdlog: 0.13.0 -> 0.14.0 --- pkgs/development/libraries/spdlog/default.nix | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pkgs/development/libraries/spdlog/default.nix b/pkgs/development/libraries/spdlog/default.nix index a47eabe5d8d..c047e9913c9 100644 --- a/pkgs/development/libraries/spdlog/default.nix +++ b/pkgs/development/libraries/spdlog/default.nix @@ -2,16 +2,16 @@ stdenv.mkDerivation rec { name = "spdlog-${version}"; - version = "0.13.0"; + version = "0.14.0"; src = fetchFromGitHub { - owner = "gabime"; - repo = "spdlog"; - rev = "v${version}"; - sha256 = "0pfagrkq6afpkl269vbi1fd6ckakzpr5b5cbapb8rr7hgsrilxza"; + owner = "gabime"; + repo = "spdlog"; + rev = "v${version}"; + sha256 = "13730429gwlabi432ilpnja3sfvy0nn2719vnhhmii34xcdyc57q"; }; - buildInputs = [ cmake ]; + nativeBuildInputs = [ cmake ]; # cmakeFlags = [ "-DSPDLOG_BUILD_EXAMPLES=ON" ]; From 0381d60e714c9353a23c198301e581205cddcb6e Mon Sep 17 00:00:00 2001 From: Peter Hoeg Date: Thu, 12 Oct 2017 12:40:35 +0800 Subject: [PATCH 2/4] spdlog: build on hydra to make life easier for everyone --- pkgs/development/libraries/spdlog/default.nix | 3 --- 1 file changed, 3 deletions(-) diff --git a/pkgs/development/libraries/spdlog/default.nix b/pkgs/development/libraries/spdlog/default.nix index c047e9913c9..1c9e67f8767 100644 --- a/pkgs/development/libraries/spdlog/default.nix +++ b/pkgs/development/libraries/spdlog/default.nix @@ -28,8 +28,5 @@ stdenv.mkDerivation rec { license = licenses.mit; maintainers = with maintainers; [ obadz ]; platforms = platforms.all; - - # This is a header-only library, no point in hydra building it: - hydraPlatforms = []; }; } From b5510549171b3a37364f19ac0bcbe26a5d9cba1c Mon Sep 17 00:00:00 2001 From: Peter Hoeg Date: Thu, 12 Oct 2017 12:40:56 +0800 Subject: [PATCH 3/4] scrypt: 1.2.0 -> 1.2.1 --- pkgs/tools/security/scrypt/default.nix | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/pkgs/tools/security/scrypt/default.nix b/pkgs/tools/security/scrypt/default.nix index 1835dbdb620..352a81b2727 100644 --- a/pkgs/tools/security/scrypt/default.nix +++ b/pkgs/tools/security/scrypt/default.nix @@ -2,27 +2,26 @@ stdenv.mkDerivation rec { name = "scrypt-${version}"; - version = "1.2.0"; + version = "1.2.1"; src = fetchurl { url = "https://www.tarsnap.com/scrypt/${name}.tgz"; - sha256 = "1m39hpfby0fdjam842773i5w7pa0qaj7f0r22jnchxsj824vqm0p"; + sha256 = "0xy5yhrwwv13skv9im9vm76rybh9f29j2dh4hlh2x01gvbkza8a6"; }; buildInputs = [ openssl ]; patchPhase = '' - substituteInPlace Makefile.in \ - --replace "command -p mv" "mv" - substituteInPlace autocrap/Makefile.am \ - --replace "command -p mv" "mv" + for f in Makefile.in autotools/Makefile.am libcperciva/cpusupport/Build/cpusupport.sh ; do + substituteInPlace $f --replace "command -p " "" + done ''; - meta = { + meta = with stdenv.lib; { description = "Encryption utility"; homepage = https://www.tarsnap.com/scrypt.html; - license = stdenv.lib.licenses.bsd2; - platforms = stdenv.lib.platforms.all; - maintainers = [ stdenv.lib.maintainers.thoughtpolice ]; + license = licenses.bsd2; + platforms = platforms.all; + maintainers = with maintainers; [ thoughtpolice ]; }; } From 515ea69f098432e20d07f9b72c530b22344dfe61 Mon Sep 17 00:00:00 2001 From: Peter Hoeg Date: Thu, 12 Oct 2017 12:41:05 +0800 Subject: [PATCH 4/4] 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 diff --git a/pkgs/tools/filesystems/cryfs/default.nix b/pkgs/tools/filesystems/cryfs/default.nix new file mode 100644 index 00000000000..07b077b9289 --- /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 8582966e81d..8525b7b2c74 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; };