summary refs log tree commit diff
path: root/pkgs/tools/misc/getoptions
diff options
context:
space:
mode:
authorMatthias Riße <matthias.risze@t-online.de>2022-04-07 18:06:33 +0200
committerMatthias Riße <m.risse@fz-juelich.de>2022-08-03 22:16:52 +0200
commite824dfe5011ceaf60f5ce765bac5e58b3a712198 (patch)
tree5c47dd5ad4c7daa9bd4eb608ecaf34f0ebc2ee86 /pkgs/tools/misc/getoptions
parenta62b1ef97740fb0814a088a53ae1057b63075a89 (diff)
downloadnixpkgs-e824dfe5011ceaf60f5ce765bac5e58b3a712198.tar
nixpkgs-e824dfe5011ceaf60f5ce765bac5e58b3a712198.tar.gz
nixpkgs-e824dfe5011ceaf60f5ce765bac5e58b3a712198.tar.bz2
nixpkgs-e824dfe5011ceaf60f5ce765bac5e58b3a712198.tar.lz
nixpkgs-e824dfe5011ceaf60f5ce765bac5e58b3a712198.tar.xz
nixpkgs-e824dfe5011ceaf60f5ce765bac5e58b3a712198.tar.zst
nixpkgs-e824dfe5011ceaf60f5ce765bac5e58b3a712198.zip
getoptions: init at 3.3.0
Diffstat (limited to 'pkgs/tools/misc/getoptions')
-rw-r--r--pkgs/tools/misc/getoptions/default.nix33
1 files changed, 33 insertions, 0 deletions
diff --git a/pkgs/tools/misc/getoptions/default.nix b/pkgs/tools/misc/getoptions/default.nix
new file mode 100644
index 00000000000..364cf2aca82
--- /dev/null
+++ b/pkgs/tools/misc/getoptions/default.nix
@@ -0,0 +1,33 @@
+{ lib, stdenvNoCC, fetchFromGitHub, shellcheck, shellspec, busybox-sandbox-shell, ksh, mksh, yash, zsh }:
+
+stdenvNoCC.mkDerivation rec {
+  pname = "getoptions";
+  version = "3.3.0";
+
+  src = fetchFromGitHub {
+    owner = "ko1nksm";
+    repo = "getoptions";
+    rev = "v${version}";
+    hash = "sha256-kUQ0dPjPr/A/btgFQu13ZLklnI284Ij74hCYbGgzF3A=";
+  };
+
+  makeFlags = [ "PREFIX=${placeholder "out"}" ];
+
+  doCheck = true;
+
+  checkInputs = [ shellcheck shellspec busybox-sandbox-shell ksh mksh yash zsh ];
+
+  preCheck = ''
+    sed -i '/shellspec -s posh/d' Makefile
+  '';
+
+  checkTarget = "check testall";
+
+  meta = with lib; {
+    description = "An elegant option/argument parser for shell scripts (full support for bash and all POSIX shells)";
+    homepage = "https://github.com/ko1nksm/getoptions";
+    license = licenses.cc0;
+    platforms = platforms.all;
+    maintainers = with maintainers; [ matrss ];
+  };
+}