2020-01-30 09:32:26 +01:00
|
|
|
{ stdenv, fetchFromGitHub, autoconf, runtimeShell, python3Packages, makeWrapper }:
|
2019-11-07 23:19:42 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "argbash";
|
|
|
|
|
2020-08-01 17:56:28 +02:00
|
|
|
version = "2.9.0";
|
2019-11-07 23:19:42 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "matejak";
|
|
|
|
repo = "argbash";
|
|
|
|
rev = "${version}";
|
2020-08-01 17:56:28 +02:00
|
|
|
sha256 = "1h6kw510r43b6d6rjhkhw4d67nc7grak4mgqs9ngjjv07qj3qfqc";
|
2019-11-07 23:19:42 +01:00
|
|
|
};
|
|
|
|
|
2020-01-30 09:32:26 +01:00
|
|
|
sourceRoot = "source/resources";
|
2019-11-07 23:19:42 +01:00
|
|
|
|
2020-01-30 09:32:26 +01:00
|
|
|
postPatch = ''
|
|
|
|
chmod -R +w ..
|
|
|
|
patchShebangs ..
|
|
|
|
substituteInPlace Makefile \
|
|
|
|
--replace '/bin/bash' "${runtimeShell}"
|
|
|
|
'';
|
|
|
|
|
|
|
|
nativeBuildInputs = [ autoconf python3Packages.docutils makeWrapper ];
|
2019-11-07 23:19:42 +01:00
|
|
|
|
|
|
|
makeFlags = [ "PREFIX=$(out)" ];
|
|
|
|
|
2020-01-30 09:32:26 +01:00
|
|
|
postInstall = ''
|
|
|
|
wrapProgram $out/bin/argbash \
|
|
|
|
--prefix PATH : '${autoconf}/bin'
|
|
|
|
'';
|
|
|
|
|
2019-11-07 23:19:42 +01:00
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|