summaryrefslogtreecommitdiffstats
path: root/pkgs/tools/security/ecryptfs
diff options
context:
space:
mode:
authorDoron Behar <doron.behar@gmail.com>2020-04-07 00:14:03 +0300
committerDoron Behar <doron.behar@gmail.com>2020-04-07 00:22:33 +0300
commit2c09a26f498fcb5fd080afb25a1a95198d6bb132 (patch)
treedc77e8f207f88b587b41f09b7256a25e56186f53 /pkgs/tools/security/ecryptfs
parentf601ab37c2fb7e5f65989a92df383bcd6942567a (diff)
ecryptfs: enable building without python2 support
Diffstat (limited to 'pkgs/tools/security/ecryptfs')
-rw-r--r--pkgs/tools/security/ecryptfs/default.nix13
1 files changed, 10 insertions, 3 deletions
diff --git a/pkgs/tools/security/ecryptfs/default.nix b/pkgs/tools/security/ecryptfs/default.nix
index 9fd8c3ac7a22..e4caa9c4e18d 100644
--- a/pkgs/tools/security/ecryptfs/default.nix
+++ b/pkgs/tools/security/ecryptfs/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, pkgconfig, perl, utillinux, keyutils, nss, nspr, python2, pam
+{ stdenv, fetchurl, pkgconfig, perl, utillinux, keyutils, nss, nspr, python2, pam, enablePython ? false
, intltool, makeWrapper, coreutils, bash, gettext, cryptsetup, lvm2, rsync, which, lsof }:
stdenv.mkDerivation rec {
@@ -33,8 +33,15 @@ stdenv.mkDerivation rec {
done
'';
- nativeBuildInputs = [ pkgconfig ];
- buildInputs = [ perl nss nspr python2 pam intltool makeWrapper ];
+ configureFlags = stdenv.lib.optionals (!enablePython) [ "--disable-pywrap" ];
+
+ nativeBuildInputs = [ pkgconfig ]
+ # if python2 support is requested, it is needed at builtime as well as runtime.
+ ++ stdenv.lib.optionals (enablePython) [ python2 ]
+ ;
+ buildInputs = [ perl nss nspr pam intltool makeWrapper ]
+ ++ stdenv.lib.optionals (enablePython) [ python2 ]
+ ;
propagatedBuildInputs = [ coreutils gettext cryptsetup lvm2 rsync keyutils which ];
postInstall = ''