3
0
Fork 0
forked from mirrors/nixpkgs

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.
This commit is contained in:
Ryan Schlesinger 2023-05-09 10:06:46 -03:00
parent 558b23afe3
commit c05657e608
No known key found for this signature in database
GPG key ID: BD9E30D205AB53BA

View file

@ -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)";