diff options
author | Mats <mats@mats.sh> | 2023-11-24 14:31:19 +0100 |
---|---|---|
committer | github-actions[bot] <github-actions[bot]@users.noreply.github.com> | 2023-11-27 09:52:57 +0000 |
commit | c0c4501dab6f3678123e3f19594715e1052202b4 (patch) | |
tree | 7c38a324d96fc99cb8f0bdbb243b9f9bf0928001 /pkgs/servers | |
parent | 260cc445472a4607744a62d870f5816f3af0392b (diff) |
samba: fix samba-tool
This commit addresses the following issues: - samba-tool requiring python built with libxcrypt-legacy - adding the missing markdown python package - fixing the shebang patching so disallowedReferences passes (cherry picked from commit 9b5cfd41d86b1bbc8c9b7406760154b4832ebb76)
Diffstat (limited to 'pkgs/servers')
-rw-r--r-- | pkgs/servers/samba/4.x.nix | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/pkgs/servers/samba/4.x.nix b/pkgs/servers/samba/4.x.nix index 4dfa8657224d3..37e98de2591bf 100644 --- a/pkgs/servers/samba/4.x.nix +++ b/pkgs/servers/samba/4.x.nix @@ -27,6 +27,7 @@ , tdb , tevent , libxcrypt +, libxcrypt-legacy , cmocka , rpcsvc-proto , bash @@ -49,6 +50,15 @@ with lib; +let + # samba-tool requires libxcrypt-legacy algorithms + python = python3Packages.python.override { + libxcrypt = libxcrypt-legacy; + }; + wrapPython = python3Packages.wrapPython.override { + inherit python; + }; +in stdenv.mkDerivation rec { pname = "samba"; version = "4.19.2"; @@ -69,7 +79,7 @@ stdenv.mkDerivation rec { ]; nativeBuildInputs = [ - python3Packages.python + python wafHook pkg-config bison @@ -93,8 +103,8 @@ stdenv.mkDerivation rec { buildInputs = [ bash - python3Packages.wrapPython - python3Packages.python + wrapPython + python readline popt dbus @@ -165,7 +175,7 @@ stdenv.mkDerivation rec { # module, which works correctly in all cases. PYTHON_CONFIG = "/invalid"; - pythonPath = [ python3Packages.dnspython tdb ]; + pythonPath = [ python3Packages.dnspython python3Packages.markdown tdb ]; preBuild = '' export MAKEFLAGS="-j $NIX_BUILD_CORES" @@ -208,12 +218,12 @@ stdenv.mkDerivation rec { # Samba does its own shebang patching, but uses build Python find $out/bin -type f -executable | while read file; do isScript "$file" || continue - sed -i 's^${lib.getBin buildPackages.python3Packages.python}/bin^${lib.getBin python3Packages.python}/bin^' "$file" + sed -i 's^${lib.getBin buildPackages.python3Packages.python}^${lib.getBin python}^' "$file" done ''; disallowedReferences = - lib.optionals (buildPackages.python3Packages.python != python3Packages.python) + lib.optionals (buildPackages.python3Packages.python != python) [ buildPackages.python3Packages.python ]; passthru = { |