From 5d238d0d637c69c3a6fe77df87124c69192bdad3 Mon Sep 17 00:00:00 2001 From: Jade Lovelace Date: Mon, 15 Jan 2024 13:29:09 -0800 Subject: [PATCH 1/3] diffoscope: fix on aarch64-darwin This was comparing stdenv.hostPlatform (an attr set) to a string. This comparison always returned not-equal, which resulted in trying to evaluate the broken gnumeric on macOS. This change fixes that to compare the "system" string as was intended originally. --- pkgs/tools/misc/diffoscope/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/tools/misc/diffoscope/default.nix b/pkgs/tools/misc/diffoscope/default.nix index 4636266e0279..512ff2872c08 100644 --- a/pkgs/tools/misc/diffoscope/default.nix +++ b/pkgs/tools/misc/diffoscope/default.nix @@ -219,7 +219,7 @@ python3.pkgs.buildPythonApplication rec { # oggvideotools is broken on Darwin, please put it back when it will be fixed? ++ lib.optionals stdenv.isLinux [ oggvideotools ] # This doesn't work on aarch64-darwin - ++ lib.optionals (stdenv.hostPlatform != "aarch64-darwin") [ gnumeric ] + ++ lib.optionals (stdenv.hostPlatform.system != "aarch64-darwin") [ gnumeric ] )); nativeCheckInputs = with python3.pkgs; [ From a88d4f7dc7ed2d122dcae053863cfa11380f3bfc Mon Sep 17 00:00:00 2001 From: Jade Lovelace Date: Mon, 15 Jan 2024 13:46:24 -0800 Subject: [PATCH 2/3] fpc: fix on llvm-strip on macOS --- pkgs/development/compilers/fpc/default.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkgs/development/compilers/fpc/default.nix b/pkgs/development/compilers/fpc/default.nix index ca16c08b5726..3c9eb60d57c7 100644 --- a/pkgs/development/compilers/fpc/default.nix +++ b/pkgs/development/compilers/fpc/default.nix @@ -36,11 +36,14 @@ stdenv.mkDerivation rec { substituteInPlace fpcsrc/compiler/systems/t_linux.pas --subst-var-by syslibpath "${glibc}/lib" # Replace the `codesign --remove-signature` command with a custom script, since `codesign` is not available # in nixpkgs + # Remove the -no_uuid strip flag which does not work on llvm-strip, only + # Apple strip. substituteInPlace fpcsrc/compiler/Makefile \ --replace \ "\$(CODESIGN) --remove-signature" \ "${./remove-signature.sh}" \ - --replace "ifneq (\$(CODESIGN),)" "ifeq (\$(OS_TARGET), darwin)" + --replace "ifneq (\$(CODESIGN),)" "ifeq (\$(OS_TARGET), darwin)" \ + --replace "-no_uuid" "" ''; NIX_LDFLAGS = lib.optionalString From 32d613548ee37bbf6e9e6778e529fa9d494ec264 Mon Sep 17 00:00:00 2001 From: Jade Lovelace Date: Wed, 17 Jan 2024 13:38:48 -0800 Subject: [PATCH 3/3] diffoscope: disable broken tests on darwin --- pkgs/tools/misc/diffoscope/default.nix | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pkgs/tools/misc/diffoscope/default.nix b/pkgs/tools/misc/diffoscope/default.nix index 512ff2872c08..b9c8b62f58ef 100644 --- a/pkgs/tools/misc/diffoscope/default.nix +++ b/pkgs/tools/misc/diffoscope/default.nix @@ -248,6 +248,15 @@ python3.pkgs.buildPythonApplication rec { "test_non_unicode_filename" "test_listing" "test_symlink_root" + + # Appears to be a sandbox related issue + "test_trim_stderr_in_command" + # Seems to be a bug caused by having different versions of rdata than + # expected. Will file upstream. + "test_item_rdb" + # Caused by getting an otool command instead of llvm-objdump. Could be Nix + # setup, could be upstream bug. Will file upstream. + "test_libmix_differences" ]; disabledTestPaths = [