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