Merge pull request #269643 from Myaats/samba-tool

samba: fix samba-tool

authored by Peder Bergebakken Sundt and committed by GitHub 8aad600d f5da19d2

+16 -6
+16 -6
pkgs/servers/samba/4.x.nix
··· 27 , tdb 28 , tevent 29 , libxcrypt 30 , cmocka 31 , rpcsvc-proto 32 , bash ··· 49 50 with lib; 51 52 stdenv.mkDerivation rec { 53 pname = "samba"; 54 version = "4.19.2"; ··· 69 ]; 70 71 nativeBuildInputs = [ 72 - python3Packages.python 73 wafHook 74 pkg-config 75 bison ··· 93 94 buildInputs = [ 95 bash 96 - python3Packages.wrapPython 97 - python3Packages.python 98 readline 99 popt 100 dbus ··· 165 # module, which works correctly in all cases. 166 PYTHON_CONFIG = "/invalid"; 167 168 - pythonPath = [ python3Packages.dnspython tdb ]; 169 170 preBuild = '' 171 export MAKEFLAGS="-j $NIX_BUILD_CORES" ··· 208 # Samba does its own shebang patching, but uses build Python 209 find $out/bin -type f -executable | while read file; do 210 isScript "$file" || continue 211 - sed -i 's^${lib.getBin buildPackages.python3Packages.python}/bin^${lib.getBin python3Packages.python}/bin^' "$file" 212 done 213 ''; 214 215 disallowedReferences = 216 - lib.optionals (buildPackages.python3Packages.python != python3Packages.python) 217 [ buildPackages.python3Packages.python ]; 218 219 passthru = {
··· 27 , tdb 28 , tevent 29 , libxcrypt 30 + , libxcrypt-legacy 31 , cmocka 32 , rpcsvc-proto 33 , bash ··· 50 51 with lib; 52 53 + let 54 + # samba-tool requires libxcrypt-legacy algorithms 55 + python = python3Packages.python.override { 56 + libxcrypt = libxcrypt-legacy; 57 + }; 58 + wrapPython = python3Packages.wrapPython.override { 59 + inherit python; 60 + }; 61 + in 62 stdenv.mkDerivation rec { 63 pname = "samba"; 64 version = "4.19.2"; ··· 79 ]; 80 81 nativeBuildInputs = [ 82 + python 83 wafHook 84 pkg-config 85 bison ··· 103 104 buildInputs = [ 105 bash 106 + wrapPython 107 + python 108 readline 109 popt 110 dbus ··· 175 # module, which works correctly in all cases. 176 PYTHON_CONFIG = "/invalid"; 177 178 + pythonPath = [ python3Packages.dnspython python3Packages.markdown tdb ]; 179 180 preBuild = '' 181 export MAKEFLAGS="-j $NIX_BUILD_CORES" ··· 218 # Samba does its own shebang patching, but uses build Python 219 find $out/bin -type f -executable | while read file; do 220 isScript "$file" || continue 221 + sed -i 's^${lib.getBin buildPackages.python3Packages.python}^${lib.getBin python}^' "$file" 222 done 223 ''; 224 225 disallowedReferences = 226 + lib.optionals (buildPackages.python3Packages.python != python) 227 [ buildPackages.python3Packages.python ]; 228 229 passthru = {