fork
Configure Feed
Select the types of activity you want to include in your feed.
lol
fork
Configure Feed
Select the types of activity you want to include in your feed.
1{ stdenv, fetchurl, pkgconfig, perl, utillinux, keyutils, nss, nspr, python2, pam
2, intltool, makeWrapper, coreutils, bash, gettext, cryptsetup, lvm2, rsync, which, lsof }:
3
4stdenv.mkDerivation rec {
5 name = "ecryptfs-${version}";
6 version = "111";
7
8 src = fetchurl {
9 url = "http://launchpad.net/ecryptfs/trunk/${version}/+download/ecryptfs-utils_${version}.orig.tar.gz";
10 sha256 = "0zwq19siiwf09h7lwa7n7mgmrr8cxifp45lmwgcfr8c1gviv6b0i";
11 };
12
13 # TODO: replace wrapperDir below with from <nixos> config.security.wrapperDir;
14 wrapperDir = "/run/wrappers/bin";
15
16 postPatch = ''
17 FILES="$(grep -r '/bin/sh' src/utils -l; find src -name \*.c)"
18 for file in $FILES; do
19 substituteInPlace "$file" \
20 --replace /bin/mount ${utillinux}/bin/mount \
21 --replace /bin/umount ${utillinux}/bin/umount \
22 --replace /sbin/mount.ecryptfs_private ${wrapperDir}/mount.ecryptfs_private \
23 --replace /sbin/umount.ecryptfs_private ${wrapperDir}/umount.ecryptfs_private \
24 --replace /sbin/mount.ecryptfs $out/sbin/mount.ecryptfs \
25 --replace /sbin/umount.ecryptfs $out/sbin/umount.ecryptfs \
26 --replace /usr/bin/ecryptfs-rewrite-file $out/bin/ecryptfs-rewrite-file \
27 --replace /usr/bin/ecryptfs-mount-private $out/bin/ecryptfs-mount-private \
28 --replace /usr/bin/ecryptfs-setup-private $out/bin/ecryptfs-setup-private \
29 --replace /sbin/cryptsetup ${cryptsetup}/sbin/cryptsetup \
30 --replace /sbin/dmsetup ${lvm2}/sbin/dmsetup \
31 --replace /sbin/unix_chkpwd ${wrapperDir}/unix_chkpwd \
32 --replace /bin/bash ${bash}/bin/bash
33 done
34 '';
35
36 buildInputs = [ pkgconfig perl nss nspr python2 pam intltool makeWrapper ];
37 propagatedBuildInputs = [ coreutils gettext cryptsetup lvm2 rsync keyutils which ];
38
39 postInstall = ''
40 FILES="$(grep -r '/bin/sh' $out/bin -l)"
41 for file in $FILES; do
42 wrapProgram $file \
43 --prefix PATH ":" "${coreutils}/bin" \
44 --prefix PATH ":" "${gettext}/bin" \
45 --prefix PATH ":" "${rsync}/bin" \
46 --prefix PATH ":" "${keyutils}/bin" \
47 --prefix PATH ":" "${which}/bin" \
48 --prefix PATH ":" "${lsof}/bin" \
49 --prefix PATH ":" "$out/bin"
50 done
51 '';
52
53 meta = with stdenv.lib; {
54 description = "Enterprise-class stacked cryptographic filesystem";
55 license = licenses.gpl2Plus;
56 maintainers = with maintainers; [ obadz ];
57 platforms = platforms.linux;
58 };
59}