From c05657e6086c47e7bbb6688eac2cff7394aaf565 Mon Sep 17 00:00:00 2001 From: Ryan Schlesinger Date: Tue, 9 May 2023 10:06:46 -0300 Subject: [PATCH] getoptions: Don't require busybox on macOS The busybox package is not available on macOS. getoptions runs checks on installation that (by default) require busybox. The busybox specific checks are now only run on other platforms. --- pkgs/tools/misc/getoptions/default.nix | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/pkgs/tools/misc/getoptions/default.nix b/pkgs/tools/misc/getoptions/default.nix index e3ee684d4df..46a67170725 100644 --- a/pkgs/tools/misc/getoptions/default.nix +++ b/pkgs/tools/misc/getoptions/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenvNoCC, fetchFromGitHub, shellcheck, shellspec, busybox-sandbox-shell, ksh, mksh, yash, zsh }: +{ lib, stdenvNoCC, fetchFromGitHub, shellspec, busybox-sandbox-shell, ksh, mksh, yash, zsh }: stdenvNoCC.mkDerivation rec { pname = "getoptions"; @@ -15,13 +15,16 @@ stdenvNoCC.mkDerivation rec { doCheck = true; - nativeCheckInputs = [ shellcheck shellspec busybox-sandbox-shell ksh mksh yash zsh ]; + nativeCheckInputs = [ shellspec ksh mksh yash zsh ] + ++ lib.lists.optional (!stdenvNoCC.isDarwin) busybox-sandbox-shell; preCheck = '' sed -i '/shellspec -s posh/d' Makefile + '' + lib.strings.optionalString stdenvNoCC.isDarwin '' + sed -i "/shellspec -s 'busybox ash'/d" Makefile ''; - checkTarget = "check testall"; + checkTarget = "testall"; meta = with lib; { description = "An elegant option/argument parser for shell scripts (full support for bash and all POSIX shells)";