optparse-bash: drop

Drop because
- it seems abandoned by the upstream years ago[1].
- there are quite some nice alternatives[2] already available in
  Nixpkgs.

[1]: https://github.com/nk412/optparse/commits/master/
[2]: https://github.com/shadawck/awesome-cli-frameworks#bashshell

Co-authored-by: Anderson Torres <torres.anderson.85@protonmail.com>
This commit is contained in:
Yueh-Shun Li 2024-01-10 16:57:55 +08:00
parent a9412aa692
commit d1c42ac350
4 changed files with 4 additions and 65 deletions

View File

@ -80,6 +80,9 @@ The pre-existing [services.ankisyncd](#opt-services.ankisyncd.enable) has been m
'';
```
- The package `optparse-bash` is now dropped due to upstream inactivity. Alternatives available in Nixpkgs include [`argc`](https://github.com/sigoden/argc), [`argbash`](https://github.com/matejak/argbash), [`bashly`](https://github.com/DannyBen/bashly) and [`gum`](https://github.com/charmbracelet/gum), to name a few.
- The `kanata` package has been updated to v1.5.0, which includes [breaking changes](https://github.com/jtroo/kanata/releases/tag/v1.5.0).
- The latest available version of Nextcloud is v28 (available as `pkgs.nextcloud28`). The installation logic is as follows:

View File

@ -1,63 +0,0 @@
{ stdenvNoCC
, lib
, fetchFromGitHub
, bash
, gnused
, gawk
, coreutils
}:
stdenvNoCC.mkDerivation {
pname = "optparse-bash-unstable";
version = "2021-06-13";
src = fetchFromGitHub {
owner = "nk412";
repo = "optparse";
rev = "d86ec17d15368e5b54eb2d47b001b0b61d68bbd0";
sha256 = "sha256-vs7Jo1+sV0tPse4Wu2xtzSX1IkahwLgO3e4Riz3uMmI=";
};
postPatch = ''
substituteInPlace optparse.bash \
--replace sed "${gnused}/bin/sed" \
--replace awk "${gawk}/bin/awk" \
--replace printf "${coreutils}/bin/printf"
'';
dontBuild = true;
doCheck = true;
nativeCheckInputs = [ bash ];
# `#!/usr/bin/env` isn't okay for OfBorg
# Need external bash to run
checkPhase = ''
runHook preCheck
bash ./sample_head.sh -v --file README.md
runHook postCheck
'';
installPhase = ''
runHook preInstall
mkdir -p $out/bin
mv optparse.bash $out/bin/
mkdir -p $out/share/doc/optparse-bash
mv README.md sample_head.sh $out/share/doc/optparse-bash/
runHook postInstall
'';
# As example code,
# sample_head.sh shows how users can use opt-parse in their script,
# and its shebang (`/usr/bin/env bash`) should not be patched.
dontPatchShebangs = true;
meta = with lib; {
description = "A BASH wrapper for getopts, for simple command-line argument parsing";
homepage = "https://github.com/nk412/optparse";
license = licenses.mit;
platforms = platforms.all;
maintainers = with maintainers; [ ShamrockLee ];
};
}

View File

@ -757,6 +757,7 @@ mapAliases ({
openmpt123 = libopenmpt; # Added 2021-09-05
openssl_3_0 = openssl_3; # Added 2022-06-27
openvpn_24 = throw "openvpn_24 has been removed, because it went EOL. 2.5.x or newer is still available"; # Added 2023-01-23
optparse-bash = throw "'optparse-bash' (GitHub: nk412/optparse) has been removed. Use 'argparse' instead"; # Added 2024-01-12
orchis = orchis-theme; # Added 2021-06-09
oroborus = throw "oroborus was removed, because it was abandoned years ago."; #Added 2023-09-10
osxfuse = macfuse-stubs; # Added 2021-03-20

View File

@ -24413,8 +24413,6 @@ with pkgs;
buildPythonPackage buildPythonApplication setuptools pycsdr pydigiham;
};
optparse-bash = callPackage ../development/libraries/optparse-bash { };
oras = callPackage ../development/tools/oras { };
orcania = callPackage ../development/libraries/orcania { };