diff options
Diffstat (limited to 'nixpkgs/pkgs/development/tools/misc/argbash/default.nix')
-rw-r--r-- | nixpkgs/pkgs/development/tools/misc/argbash/default.nix | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/tools/misc/argbash/default.nix b/nixpkgs/pkgs/development/tools/misc/argbash/default.nix new file mode 100644 index 000000000000..571050508146 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/argbash/default.nix @@ -0,0 +1,39 @@ +{ lib, stdenv, fetchFromGitHub, autoconf, runtimeShell, python3Packages, makeWrapper }: + +stdenv.mkDerivation rec { + pname = "argbash"; + + version = "2.10.0"; + + src = fetchFromGitHub { + owner = "matejak"; + repo = "argbash"; + rev = version; + sha256 = "1xdhpbnc0xjv6ydcm122hhdjcl77jhiqnccjfqjp3cd1lfmzvg8v"; + }; + + sourceRoot = "source/resources"; + + postPatch = '' + chmod -R +w .. + patchShebangs .. + substituteInPlace Makefile \ + --replace '/bin/bash' "${runtimeShell}" + ''; + + nativeBuildInputs = [ autoconf python3Packages.docutils makeWrapper ]; + + makeFlags = [ "PREFIX=$(out)" ]; + + postInstall = '' + wrapProgram $out/bin/argbash \ + --prefix PATH : '${autoconf}/bin' + ''; + + meta = with lib; { + description = "Bash argument parsing code generator"; + homepage = "https://argbash.io/"; + license = licenses.free; # custom license. See LICENSE in source repo. + maintainers = with maintainers; [ rencire ]; + }; +} |