depot/third_party/nixpkgs/pkgs/development/tools/misc/argbash/default.nix
Default email 58f8944c92 Project import generated by Copybara.
GitOrigin-RevId: 5aba0fe9766a7201a336249fd6cb76e0d7ba2faf
2020-09-24 23:45:31 -05:00

39 lines
971 B
Nix

{ 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 stdenv.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 ];
};
}