2021-01-23 12:26:19 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, autoconf, runtimeShell, python3Packages, makeWrapper }:
|
2019-11-07 22:19:42 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "argbash";
|
|
|
|
|
2020-09-24 22:58:51 +01:00
|
|
|
version = "2.10.0";
|
2019-11-07 22:19:42 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "matejak";
|
|
|
|
repo = "argbash";
|
2020-11-01 22:39:49 +00:00
|
|
|
rev = version;
|
2020-09-24 22:58:51 +01:00
|
|
|
sha256 = "1xdhpbnc0xjv6ydcm122hhdjcl77jhiqnccjfqjp3cd1lfmzvg8v";
|
2019-11-07 22:19:42 +00:00
|
|
|
};
|
|
|
|
|
2020-01-30 08:32:26 +00:00
|
|
|
sourceRoot = "source/resources";
|
2019-11-07 22:19:42 +00:00
|
|
|
|
2020-01-30 08:32:26 +00:00
|
|
|
postPatch = ''
|
|
|
|
chmod -R +w ..
|
|
|
|
patchShebangs ..
|
|
|
|
substituteInPlace Makefile \
|
|
|
|
--replace '/bin/bash' "${runtimeShell}"
|
|
|
|
'';
|
|
|
|
|
|
|
|
nativeBuildInputs = [ autoconf python3Packages.docutils makeWrapper ];
|
2019-11-07 22:19:42 +00:00
|
|
|
|
|
|
|
makeFlags = [ "PREFIX=$(out)" ];
|
|
|
|
|
2020-01-30 08:32:26 +00:00
|
|
|
postInstall = ''
|
|
|
|
wrapProgram $out/bin/argbash \
|
|
|
|
--prefix PATH : '${autoconf}/bin'
|
|
|
|
'';
|
|
|
|
|
2021-01-23 12:26:19 +00:00
|
|
|
meta = with lib; {
|
2019-11-07 22:19:42 +00:00
|
|
|
description = "Bash argument parsing code generator";
|
|
|
|
homepage = "https://argbash.io/";
|
|
|
|
license = licenses.free; # custom license. See LICENSE in source repo.
|
|
|
|
maintainers = with maintainers; [ rencire ];
|
|
|
|
};
|
|
|
|
}
|