From 279ffaa62139d628abf1aa2a67d47aaadef4454d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Llu=C3=ADs=20Batlle=20i=20Rossell?= Date: Mon, 25 Jan 2010 10:34:47 +0000 Subject: [PATCH] Adding ecryptfs, and one of its dependencies: keyutils. (I have not tried whether they work) svn path=/nixpkgs/trunk/; revision=19645 --- pkgs/os-specific/linux/keyutils/default.nix | 25 +++++++++++++++++++++ pkgs/tools/security/ecryptfs/default.nix | 18 +++++++++++++++ pkgs/top-level/all-packages.nix | 8 +++++++ 3 files changed, 51 insertions(+) create mode 100644 pkgs/os-specific/linux/keyutils/default.nix create mode 100644 pkgs/tools/security/ecryptfs/default.nix diff --git a/pkgs/os-specific/linux/keyutils/default.nix b/pkgs/os-specific/linux/keyutils/default.nix new file mode 100644 index 000000000000..43c580c2528f --- /dev/null +++ b/pkgs/os-specific/linux/keyutils/default.nix @@ -0,0 +1,25 @@ +{stdenv, fetchurl}: + +stdenv.mkDerivation rec { + name = "keyutils-1.2"; + + src = fetchurl { + url = http://people.redhat.com/dhowells/keyutils/keyutils-1.2.tar.bz2; + sha256 = "0gcv47crbaw6crgn02j1w75mknhnwgkhmfcmwq2qi9iwiwprnv9h"; + }; + + patchPhase = '' + sed -i -e "s, /etc, $out/etc," \ + -e "s, /bin, $out/bin," \ + -e "s, /sbin, $out/sbin," \ + -e "s, /lib, $out/lib," \ + -e "s,/usr,$out," \ + Makefile + ''; + + meta = { + homepage = http://people.redhat.com/dhowells/keyutils/; + description = "Tools used to control the Linux kernel key management system"; + license = "GPLv2+"; + }; +} diff --git a/pkgs/tools/security/ecryptfs/default.nix b/pkgs/tools/security/ecryptfs/default.nix new file mode 100644 index 000000000000..d1ed6f420ec3 --- /dev/null +++ b/pkgs/tools/security/ecryptfs/default.nix @@ -0,0 +1,18 @@ +{stdenv, fetchurl, fuse, python, perl, keyutils, pam, nss, nspr}: +stdenv.mkDerivation { + name = "ecryptfs-82"; + + src = fetchurl { + url = http://launchpad.net/ecryptfs/trunk/82/+download/ecryptfs-utils_82.orig.tar.gz; + sha256 = "1w3swispgp71prz8h56hqby2wwnvam5vllqvc69rn8cf605i69a6"; + }; + + NIX_CFLAGS_COMPILE = "-I${nspr}/include/nspr -I${nss}/include/nss"; + + buildInputs = [ python perl keyutils pam nss nspr ]; + + meta = { + description = "Enterprise-class stacked cryptographic filesystem"; + license = "GPLv2+"; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 2cbcb8bfa1d0..02f376e9f71f 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -612,6 +612,10 @@ let inherit fetchurl stdenv pkgconfig libuuid; }; + ecryptfs = import ../tools/security/ecryptfs { + inherit fetchurl stdenv fuse python perl keyutils pam nss nspr; + }; + enblendenfuse = import ../tools/graphics/enblend-enfuse { inherit fetchurl stdenv libtiff libpng lcms libxmi boost; }; @@ -5794,6 +5798,10 @@ let inherit fetchurl stdenv perl mktemp module_init_tools; }); + keyutils = import ../os-specific/linux/keyutils { + inherit fetchurl stdenv; + }; + libselinux = import ../os-specific/linux/libselinux { inherit fetchurl stdenv libsepol; };