mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-04-15 12:07:58 +00:00
Merge pull request #182530 from Artturin/sambadontdependbuilpyth
This commit is contained in:
commit
750bb8057c
@ -26,6 +26,7 @@
|
||||
, tdb
|
||||
, cmocka
|
||||
, rpcsvc-proto
|
||||
, bash
|
||||
, python3Packages
|
||||
, nixosTests
|
||||
|
||||
@ -82,8 +83,9 @@ stdenv.mkDerivation rec {
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
python3Packages.python
|
||||
bash
|
||||
python3Packages.wrapPython
|
||||
python3Packages.python
|
||||
readline
|
||||
popt
|
||||
dbus
|
||||
@ -170,14 +172,20 @@ stdenv.mkDerivation rec {
|
||||
EOF
|
||||
find $out -type f -regex '.*\.so\(\..*\)?' -exec $SHELL -c "$SCRIPT" \;
|
||||
|
||||
# Samba does its own shebang patching, but uses build Python
|
||||
find "$out/bin" -type f -executable -exec \
|
||||
sed -i '1 s^#!${python3Packages.python.pythonForBuild}/bin/python.*^#!${python3Packages.python.interpreter}^' {} \;
|
||||
|
||||
# Fix PYTHONPATH for some tools
|
||||
wrapPythonPrograms
|
||||
|
||||
# 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"
|
||||
done
|
||||
'';
|
||||
|
||||
disallowedReferences =
|
||||
lib.optionals (buildPackages.python3Packages.python != python3Packages.python)
|
||||
[ buildPackages.python3Packages.python ];
|
||||
|
||||
passthru = {
|
||||
tests.samba = nixosTests.samba;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user