10 stdenvNoCC.mkDerivation {
11 pname = "optparse-bash-unstable";
12 version = "2021-06-13";
14 src = fetchFromGitHub {
17 rev = "d86ec17d15368e5b54eb2d47b001b0b61d68bbd0";
18 sha256 = "sha256-vs7Jo1+sV0tPse4Wu2xtzSX1IkahwLgO3e4Riz3uMmI=";
22 substituteInPlace optparse.bash \
23 --replace sed "${gnused}/bin/sed" \
24 --replace awk "${gawk}/bin/awk" \
25 --replace printf "${coreutils}/bin/printf"
32 nativeCheckInputs = [ bash ];
34 # `#!/usr/bin/env` isn't okay for OfBorg
35 # Need external bash to run
38 bash ./sample_head.sh -v --file README.md
45 mv optparse.bash $out/bin/
46 mkdir -p $out/share/doc/optparse-bash
47 mv README.md sample_head.sh $out/share/doc/optparse-bash/
52 # sample_head.sh shows how users can use opt-parse in their script,
53 # and its shebang (`/usr/bin/env bash`) should not be patched.
54 dontPatchShebangs = true;
57 description = "A BASH wrapper for getopts, for simple command-line argument parsing";
58 homepage = "https://github.com/nk412/optparse";
59 license = licenses.mit;
60 platforms = platforms.all;
61 maintainers = with maintainers; [ ShamrockLee ];