Merge pull request #269643 from Myaats/samba-tool
samba: fix samba-tool
This commit is contained in:
commit
8aad600dc2
1 changed files with 16 additions and 6 deletions
|
@ -27,6 +27,7 @@
|
||||||
, tdb
|
, tdb
|
||||||
, tevent
|
, tevent
|
||||||
, libxcrypt
|
, libxcrypt
|
||||||
|
, libxcrypt-legacy
|
||||||
, cmocka
|
, cmocka
|
||||||
, rpcsvc-proto
|
, rpcsvc-proto
|
||||||
, bash
|
, bash
|
||||||
|
@ -49,6 +50,15 @@
|
||||||
|
|
||||||
with lib;
|
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 {
|
stdenv.mkDerivation rec {
|
||||||
pname = "samba";
|
pname = "samba";
|
||||||
version = "4.19.2";
|
version = "4.19.2";
|
||||||
|
@ -69,7 +79,7 @@ stdenv.mkDerivation rec {
|
||||||
];
|
];
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
python3Packages.python
|
python
|
||||||
wafHook
|
wafHook
|
||||||
pkg-config
|
pkg-config
|
||||||
bison
|
bison
|
||||||
|
@ -93,8 +103,8 @@ stdenv.mkDerivation rec {
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
bash
|
bash
|
||||||
python3Packages.wrapPython
|
wrapPython
|
||||||
python3Packages.python
|
python
|
||||||
readline
|
readline
|
||||||
popt
|
popt
|
||||||
dbus
|
dbus
|
||||||
|
@ -165,7 +175,7 @@ stdenv.mkDerivation rec {
|
||||||
# module, which works correctly in all cases.
|
# module, which works correctly in all cases.
|
||||||
PYTHON_CONFIG = "/invalid";
|
PYTHON_CONFIG = "/invalid";
|
||||||
|
|
||||||
pythonPath = [ python3Packages.dnspython tdb ];
|
pythonPath = [ python3Packages.dnspython python3Packages.markdown tdb ];
|
||||||
|
|
||||||
preBuild = ''
|
preBuild = ''
|
||||||
export MAKEFLAGS="-j $NIX_BUILD_CORES"
|
export MAKEFLAGS="-j $NIX_BUILD_CORES"
|
||||||
|
@ -208,12 +218,12 @@ stdenv.mkDerivation rec {
|
||||||
# Samba does its own shebang patching, but uses build Python
|
# Samba does its own shebang patching, but uses build Python
|
||||||
find $out/bin -type f -executable | while read file; do
|
find $out/bin -type f -executable | while read file; do
|
||||||
isScript "$file" || continue
|
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
|
done
|
||||||
'';
|
'';
|
||||||
|
|
||||||
disallowedReferences =
|
disallowedReferences =
|
||||||
lib.optionals (buildPackages.python3Packages.python != python3Packages.python)
|
lib.optionals (buildPackages.python3Packages.python != python)
|
||||||
[ buildPackages.python3Packages.python ];
|
[ buildPackages.python3Packages.python ];
|
||||||
|
|
||||||
passthru = {
|
passthru = {
|
||||||
|
|
Loading…
Reference in a new issue