about summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorJörg Thalheim <Mic92@users.noreply.github.com>2020-05-26 08:47:16 +0100
committerGitHub <noreply@github.com>2020-05-26 08:47:16 +0100
commitfcea61d1fbbb124cd1843ea224280e8d41b0d664 (patch)
treef3a169f33cb200d2144c2c43951dd6b92ec71872 /pkgs
parentf76f13b1a7020dc4175b86e7863c39e756928f2f (diff)
parent2c09a26f498fcb5fd080afb25a1a95198d6bb132 (diff)
Merge pull request #84515 from doronbehar/improve-ecryptfs
ecryptfs: enable building without python2 support
Diffstat (limited to 'pkgs')
-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 9fd8c3ac7a22d..e4caa9c4e18de 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 = ''