samba4: add wrapPythonPrograms (#132373)

This commit is contained in:
Artturi 2021-08-03 19:07:23 +03:00 committed by GitHub
parent 78090fd990
commit 61dd23eeaf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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 = {