git.iko.soy/typeable/nixpkgs
on master help sign in
argbash: fix build

* Fixed sourceRoot as it's not possible to write in a different store-path (`${src}` in this case). * Patched shebangs to not use `/bin/bash`. * Added `docutils` to nativeBuildInputs to fix build of the man-pages See also https://hydra.nixos.org/build/110901127

commit8539d5f48f9de4ba428d2ca6687712db1d9cb2b7 authorMaximilian Bosch <maximilian@mbosch.me> dateThu 30 Jan 2020, 09:32 (7 years ago) parent183e706
1 file changed+15−3
pkgs/development/tools/misc/argbash/default.nix+15−3
pkgs/development/tools/misc/argbash/default.nix+15−3
@@ -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/";