about summary refs log tree commit diff
path: root/pkgs/tools/security/ecryptfs
diff options
context:
space:
mode:
authorWilliam A. Kennington III <william@wkennington.com>2014-05-10 00:31:34 -0500
committerWilliam A. Kennington III <william@wkennington.com>2014-05-10 04:13:29 -0500
commitf75ea738eddeaba586e7f6749e9bf841598f37b5 (patch)
tree31e92a6ddc2dc5f8a7a5854cac7537ddbb67bbe3 /pkgs/tools/security/ecryptfs
parente2672e892a1e01a6d0cd1797f0398c5bb9fd6b93 (diff)
downloadnixlib-f75ea738eddeaba586e7f6749e9bf841598f37b5.tar
nixlib-f75ea738eddeaba586e7f6749e9bf841598f37b5.tar.gz
nixlib-f75ea738eddeaba586e7f6749e9bf841598f37b5.tar.bz2
nixlib-f75ea738eddeaba586e7f6749e9bf841598f37b5.tar.lz
nixlib-f75ea738eddeaba586e7f6749e9bf841598f37b5.tar.xz
nixlib-f75ea738eddeaba586e7f6749e9bf841598f37b5.tar.zst
nixlib-f75ea738eddeaba586e7f6749e9bf841598f37b5.zip
ecryptfs: Update from 82 -> 104
Diffstat (limited to 'pkgs/tools/security/ecryptfs')
-rw-r--r--pkgs/tools/security/ecryptfs/default.nix35
1 files changed, 27 insertions, 8 deletions
diff --git a/pkgs/tools/security/ecryptfs/default.nix b/pkgs/tools/security/ecryptfs/default.nix
index d1ed6f420ec3..13046aa0b2d1 100644
--- a/pkgs/tools/security/ecryptfs/default.nix
+++ b/pkgs/tools/security/ecryptfs/default.nix
@@ -1,18 +1,37 @@
-{stdenv, fetchurl, fuse, python, perl, keyutils, pam, nss, nspr}:
+{ stdenv, fetchurl, pkgconfig, perl, keyutils, nss, nspr, python, pam
+, intltool, makeWrapper, coreutils, gettext, cryptsetup, lvm2, rsync, which }:
+
 stdenv.mkDerivation {
-  name = "ecryptfs-82";
+  name = "ecryptfs-104";
 
   src = fetchurl {
-    url = http://launchpad.net/ecryptfs/trunk/82/+download/ecryptfs-utils_82.orig.tar.gz;
-    sha256 = "1w3swispgp71prz8h56hqby2wwnvam5vllqvc69rn8cf605i69a6";
+    url = http://launchpad.net/ecryptfs/trunk/104/+download/ecryptfs-utils_104.orig.tar.gz;
+    sha256 = "0f3lzpjw97vcdqzzgii03j3knd6pgwn1y0lpaaf46iidaiv0282a";
   };
 
-  NIX_CFLAGS_COMPILE = "-I${nspr}/include/nspr -I${nss}/include/nss";
+  buildInputs = [ pkgconfig perl nss nspr python pam intltool makeWrapper ];
+  propagatedBuildInputs = [ coreutils gettext cryptsetup lvm2 rsync keyutils which ];
 
-  buildInputs = [ python perl keyutils pam nss nspr ];
+  postInstall = ''
+    FILES="$(grep -r '/bin/sh' $out/bin | sed 's,:.*,,' | uniq)"
+    for file in $FILES; do
+      sed -i $file -e "s,\(/sbin/u\?mount.ecryptfs\(_private\)\?\),$out\1," \
+        -e "s,\(/sbin/cryptsetup\),${cryptsetup}\1," \
+        -e "s,\(/sbin/dmsetup\),${lvm2}\1," \
+        -e 's,/sbin/\(unix_chkpwd\),\1,'
+      wrapProgram $file \
+        --prefix PATH ":" "${coreutils}/bin" \
+        --prefix PATH ":" "${gettext}/bin" \
+        --prefix PATH ":" "${rsync}/bin" \
+        --prefix PATH ":" "${keyutils}/bin" \
+        --prefix PATH ":" "${which}/bin" \
+        --prefix PATH ":" "$out/bin"
+    done
+  '';
 
-  meta = {
+  meta = with stdenv.lib; {
     description = "Enterprise-class stacked cryptographic filesystem";
-    license = "GPLv2+";
+    license = licenses.gpl2Plus;
+    platforms = platforms.linux;
   };
 }