2020-04-24 23:36:52 +00:00
|
|
|
{ stdenv, fetchFromGitHub, autoconf, runtimeShell, python3Packages, makeWrapper }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "argbash";
|
|
|
|
|
2020-09-25 04:45:31 +00:00
|
|
|
version = "2.10.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "matejak";
|
|
|
|
repo = "argbash";
|
2020-11-03 02:18:15 +00:00
|
|
|
rev = version;
|
2020-09-25 04:45:31 +00:00
|
|
|
sha256 = "1xdhpbnc0xjv6ydcm122hhdjcl77jhiqnccjfqjp3cd1lfmzvg8v";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|