@@ -1,4 +1,4 @@
1−{ stdenv, fetchFromGitHub, autoconf }:
1+{ stdenv, fetchFromGitHub, autoconf, runtimeShell, python3Packages, makeWrapper }:
22
33stdenv.mkDerivation rec {
44 pname = "argbash";
@@ -12,12 +12,24 @@ stdenv.mkDerivation rec {
1212 sha256 = "0zara7v3pnwiwkpb0x0g37pxhmim4425q4gba712f6djj115r1mr";
1313 };
1414
15− sourceRoot = "${src}/resources";
15+ sourceRoot = "source/resources";
1616
17− nativeBuildInputs = [ autoconf ];
17+ postPatch = ''
18+ chmod -R +w ..
19+ patchShebangs ..
20+ substituteInPlace Makefile \
21+ --replace '/bin/bash' "${runtimeShell}"
22+ '';
23+
24+ nativeBuildInputs = [ autoconf python3Packages.docutils makeWrapper ];
1825
1926 makeFlags = [ "PREFIX=$(out)" ];
2027
28+ postInstall = ''
29+ wrapProgram $out/bin/argbash \
30+ --prefix PATH : '${autoconf}/bin'
31+ '';
32+
2133 meta = with stdenv.lib; {
2234 description = "Bash argument parsing code generator";
2335 homepage = "https://argbash.io/";