From 69b44c962d92bc1126c1578cbedda7327a9a0540 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Tue, 25 Nov 2025 23:09:01 +0000 Subject: [PATCH] python3Packages.macholib: 1.16.3 -> 1.16.4 Co-authored-by: Michael Daniels --- .../python-modules/macholib/default.nix | 21 +++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/macholib/default.nix b/pkgs/development/python-modules/macholib/default.nix index 4f19dfdc8e3a..c1223be22b92 100644 --- a/pkgs/development/python-modules/macholib/default.nix +++ b/pkgs/development/python-modules/macholib/default.nix @@ -7,20 +7,35 @@ altgraph, setuptools, pyinstaller, + bashNonInteractive, + coreutils, }: +let + coreutils' = coreutils.override { singleBinary = false; }; +in buildPythonPackage rec { pname = "macholib"; - version = "1.16.3"; + version = "1.16.4"; pyproject = true; src = fetchFromGitHub { owner = "ronaldoussoren"; repo = "macholib"; rev = "v${version}"; - hash = "sha256-bTql10Ceny4fBCxnEWz1m1wi03EWMDW9u99IQiWYbnY="; + hash = "sha256-+7dFPwzwKmvtDY/blLNyrNDEATcgo+BUceoSGg55gbo="; }; + # test_command_line.py::test_shared_main requires that /bin/sh and + # /bin/ls exist and are regular executables (not symlinks). + # It also dislikes something about the real /bin. + postPatch = lib.optionalString doCheck '' + substituteInPlace macholib_tests/test_command_line.py \ + --replace-fail '"/bin/sh"' '"${lib.getExe' bashNonInteractive "bash"}"' \ + --replace-fail '"/bin/ls"' '"${lib.getExe' coreutils' "ls"}"' \ + --replace-fail '"/bin"' '"${lib.getBin coreutils'}/bin"' + ''; + build-system = [ setuptools ]; dependencies = [ @@ -30,6 +45,8 @@ buildPythonPackage rec { # Checks assume to find darwin specific libraries doCheck = stdenv.buildPlatform.isDarwin; nativeCheckInputs = [ + bashNonInteractive + coreutils' unittestCheckHook ];