diff --git a/pkgs/by-name/in/inetutils/package.nix b/pkgs/by-name/in/inetutils/package.nix index 2a24e641e991..07f2c3d67e26 100644 --- a/pkgs/by-name/in/inetutils/package.nix +++ b/pkgs/by-name/in/inetutils/package.nix @@ -10,7 +10,6 @@ libxcrypt, util-linux, }: - stdenv.mkDerivation rec { pname = "inetutils"; version = "2.7"; @@ -31,7 +30,7 @@ stdenv.mkDerivation rec { # https://git.congatec.com/yocto/meta-openembedded/commit/3402bfac6b595c622e4590a8ff5eaaa854e2a2a3 ./inetutils-1_9-PATH_PROCNET_DEV.patch - ./tests-libls.sh.patch + (if stdenv.isDarwin then ./tests-libls-2.sh.patch else ./tests-libls.sh.patch) (fetchpatch { name = "CVE-2026-24061_1.patch"; @@ -78,6 +77,8 @@ stdenv.mkDerivation rec { ] ++ lib.optional stdenv.hostPlatform.isDarwin "--disable-servers"; + ${if stdenv.isDarwin then "hardeningDisable" else null} = [ "format" ]; + doCheck = true; installFlags = [ "SUIDMODE=" ]; diff --git a/pkgs/by-name/in/inetutils/tests-libls-2.sh.patch b/pkgs/by-name/in/inetutils/tests-libls-2.sh.patch new file mode 100644 index 000000000000..41c566811cac --- /dev/null +++ b/pkgs/by-name/in/inetutils/tests-libls-2.sh.patch @@ -0,0 +1,18 @@ +tests: Remove bogus test for unsorted file listing and tests for -u and -c, which fail on apfs. + +Minimized from what Debian applies: +https://git.hadrons.org/cgit/debian/pkgs/inetutils.git/tree/debian/patches/local/0006-tests-Remove-bogus-test-for-unsorted-file-listing.patch?id=8ab7f49fe5cf194e989ae6ae6a78eb65397c5778 +--- a/tests/libls.sh ++++ b/tests/libls.sh +@@ -94 +93,0 @@ REPLY_C=`$LS -C $LSDIR` +-REPLY_Cf=`$LS -Cf $LSDIR` +@@ -108,2 +106,0 @@ REPLY_n=`$LS -n $LSDIR` +-REPLY_Ccts=`$LS -Ccts $LSDIR` +-REPLY_Cuts=`$LS -Cuts $LSDIR` +@@ -133,2 +129,0 @@ test `echo "$diff" | $GREP -c -v '^[.]\{1,2\}$'` -eq 0 || +-test x"$REPLY_C" != x"$REPLY_Cf" || +- { errno=1; echo >&2 'Failed to disable sorting with "-f".'; } +@@ -153,3 +146,0 @@ test x"$REPLY_l" != x"$REPLY_n" || +-test x"$REPLY_Ccts" != x"$REPLY_Cuts" || +- { errno=1; echo >&2 'Failed to distinguish "-u" from "-c".'; } +- diff --git a/pkgs/development/python-modules/msrest/default.nix b/pkgs/development/python-modules/msrest/default.nix index 228f55b547ad..83756a617e41 100644 --- a/pkgs/development/python-modules/msrest/default.nix +++ b/pkgs/development/python-modules/msrest/default.nix @@ -1,19 +1,25 @@ { lib, + buildPythonPackage, + fetchFromGitHub, + pythonAtLeast, + + # build-system + setuptools, + + # dependencies aiodns, aiohttp, azure-core, - buildPythonPackage, certifi, - fetchFromGitHub, - httpretty, isodate, - pytest-aiohttp, - pytestCheckHook, - pythonAtLeast, requests, requests-oauthlib, - setuptools, + + # tests + pytestCheckHook, + pytest-aiohttp, + httpretty, trio, }: @@ -25,17 +31,18 @@ buildPythonPackage { src = fetchFromGitHub { owner = "Azure"; repo = "msrest-for-python"; - # no tag for 0.7.1 + # no tag for 0.7.1 see: + # https://github.com/Azure/msrest-for-python/issues/254 rev = "2d8fd04f68a124d0f3df7b81584accc3270b1afc"; hash = "sha256-1EXXXflhDeU+erdI+NsWxSX76ooDTl3+MyQwRzm2xV0="; }; - nativeBuildInputs = [ setuptools ]; + build-system = [ setuptools ]; - propagatedBuildInputs = [ - azure-core + dependencies = [ aiodns aiohttp + azure-core certifi isodate requests @@ -60,13 +67,23 @@ buildPythonPackage { "test_conf_async_trio_requests" ] ++ lib.optionals (pythonAtLeast "3.12") [ - # AttributeError: 'TestAuthentication' object has no attribute... + # See https://github.com/Azure/msrest-for-python/issues/261 + # Upstream ignores the following patch that should fix it: + # https://github.com/Azure/msrest-for-python/pull/262 + # And it doesn't apply anymore. "test_apikey_auth" "test_cs_auth" "test_eventgrid_auth" "test_eventgrid_domain_auth" ]; + disabledTestPaths = [ + # 2 AssertionErrors... See: + # https://github.com/Azure/msrest-for-python/issues/267 + "tests/asynctests/test_async_client.py::TestServiceClient::test_client_send" + "tests/test_client.py::TestServiceClient::test_client_send" + ]; + pythonImportsCheck = [ "msrest" ]; meta = {