2023-04-12 12:48:02 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, autoconf
|
|
|
|
, makeWrapper
|
|
|
|
, python3Packages
|
|
|
|
, runtimeShell
|
|
|
|
}:
|
|
|
|
|
2023-04-29 16:46:19 +00:00
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
2020-04-24 23:36:52 +00:00
|
|
|
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";
|
2023-04-29 16:46:19 +00:00
|
|
|
rev = finalAttrs.version;
|
2023-04-12 12:48:02 +00:00
|
|
|
hash = "sha256-G739q6OhsXEldpIxiyOU51AmG4RChMqaN1t2wOy6sPU=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
2023-04-12 12:48:02 +00:00
|
|
|
patchShebangs .
|
|
|
|
substituteInPlace resources/Makefile \
|
2020-04-24 23:36:52 +00:00
|
|
|
--replace '/bin/bash' "${runtimeShell}"
|
|
|
|
'';
|
|
|
|
|
2023-04-12 12:48:02 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
autoconf
|
|
|
|
makeWrapper
|
|
|
|
python3Packages.docutils
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-04-12 12:48:02 +00:00
|
|
|
makeFlags = [
|
|
|
|
"-C" "resources"
|
|
|
|
"PREFIX=$(out)"
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
wrapProgram $out/bin/argbash \
|
|
|
|
--prefix PATH : '${autoconf}/bin'
|
|
|
|
'';
|
|
|
|
|
2023-04-12 12:48:02 +00:00
|
|
|
meta = {
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://argbash.io/";
|
2023-04-12 12:48:02 +00:00
|
|
|
description = "Bash argument parsing code generator";
|
|
|
|
license = lib.licenses.bsd3;
|
|
|
|
maintainers = with lib.maintainers; [ AndersonTorres ];
|
|
|
|
platforms = lib.platforms.all;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
2023-04-12 12:48:02 +00:00
|
|
|
})
|