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:
parent
558b23afe3
commit
c05657e608
|
@ -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 {
|
stdenvNoCC.mkDerivation rec {
|
||||||
pname = "getoptions";
|
pname = "getoptions";
|
||||||
|
@ -15,13 +15,16 @@ stdenvNoCC.mkDerivation rec {
|
||||||
|
|
||||||
doCheck = true;
|
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 = ''
|
preCheck = ''
|
||||||
sed -i '/shellspec -s posh/d' Makefile
|
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; {
|
meta = with lib; {
|
||||||
description = "An elegant option/argument parser for shell scripts (full support for bash and all POSIX shells)";
|
description = "An elegant option/argument parser for shell scripts (full support for bash and all POSIX shells)";
|
||||||
|
|
Loading…
Reference in a new issue