summary refs log tree commit diff
path: root/pkgs/servers/samba
diff options
context:
space:
mode:
authorArtturi <Artturin@artturin.com>2021-08-03 19:07:23 +0300
committerGitHub <noreply@github.com>2021-08-03 12:07:23 -0400
commit61dd23eeaf998ff94a25150bc51099835842f145 (patch)
treeba3508ae38540cf0dd7d11b89c3b39ace14a093f /pkgs/servers/samba
parent78090fd990c0f2df96ee98d9e1da400248ef5af3 (diff)
downloadnixpkgs-61dd23eeaf998ff94a25150bc51099835842f145.tar
nixpkgs-61dd23eeaf998ff94a25150bc51099835842f145.tar.gz
nixpkgs-61dd23eeaf998ff94a25150bc51099835842f145.tar.bz2
nixpkgs-61dd23eeaf998ff94a25150bc51099835842f145.tar.lz
nixpkgs-61dd23eeaf998ff94a25150bc51099835842f145.tar.xz
nixpkgs-61dd23eeaf998ff94a25150bc51099835842f145.tar.zst
nixpkgs-61dd23eeaf998ff94a25150bc51099835842f145.zip
samba4: add wrapPythonPrograms (#132373)
Diffstat (limited to 'pkgs/servers/samba')
-rw-r--r--pkgs/servers/samba/4.x.nix13
1 files changed, 9 insertions, 4 deletions
diff --git a/pkgs/servers/samba/4.x.nix b/pkgs/servers/samba/4.x.nix
index fe2891f2ac7..eb03ea3ef6e 100644
--- a/pkgs/servers/samba/4.x.nix
+++ b/pkgs/servers/samba/4.x.nix
@@ -1,7 +1,6 @@
 { lib, stdenv
 , buildPackages
 , fetchurl
-, python3
 , wafHook
 , pkg-config
 , bison
@@ -64,7 +63,7 @@ stdenv.mkDerivation rec {
   ];
 
   nativeBuildInputs = [
-    python3
+    python3Packages.python
     wafHook
     pkg-config
     bison
@@ -83,7 +82,8 @@ stdenv.mkDerivation rec {
   ];
 
   buildInputs = [
-    python3
+    python3Packages.python
+    python3Packages.wrapPython
     readline
     popt
     dbus
@@ -146,6 +146,8 @@ stdenv.mkDerivation rec {
   # module, which works correctly in all cases.
   PYTHON_CONFIG = "/invalid";
 
+  pythonPath = [ python3Packages.dnspython tdb ];
+
   preBuild = ''
     export MAKEFLAGS="-j $NIX_BUILD_CORES"
   '';
@@ -167,7 +169,10 @@ stdenv.mkDerivation rec {
 
     # Samba does its own shebang patching, but uses build Python
     find "$out/bin" -type f -executable -exec \
-      sed -i '1 s^#!${python3.pythonForBuild}/bin/python.*^#!${python3.interpreter}^' {} \;
+      sed -i '1 s^#!${python3Packages.python.pythonForBuild}/bin/python.*^#!${python3Packages.python.interpreter}^' {} \;
+
+    # Fix PYTHONPATH for some tools
+    wrapPythonPrograms
   '';
 
   passthru = {