From 8539d5f48f9de4ba428d2ca6687712db1d9cb2b7 Mon Sep 17 00:00:00 2001 From: Maximilian Bosch Date: Thu, 30 Jan 2020 09:32:26 +0100 Subject: [PATCH] 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 --- .../development/tools/misc/argbash/default.nix | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/pkgs/development/tools/misc/argbash/default.nix b/pkgs/development/tools/misc/argbash/default.nix index b8e3ff4a9df..0cc25ddf20b 100644 --- a/pkgs/development/tools/misc/argbash/default.nix +++ b/pkgs/development/tools/misc/argbash/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchFromGitHub, autoconf }: +{ stdenv, fetchFromGitHub, autoconf, runtimeShell, python3Packages, makeWrapper }: stdenv.mkDerivation rec { pname = "argbash"; @@ -12,12 +12,24 @@ stdenv.mkDerivation rec { sha256 = "0zara7v3pnwiwkpb0x0g37pxhmim4425q4gba712f6djj115r1mr"; }; - sourceRoot = "${src}/resources"; + sourceRoot = "source/resources"; - nativeBuildInputs = [ autoconf ]; + postPatch = '' + chmod -R +w .. + patchShebangs .. + substituteInPlace Makefile \ + --replace '/bin/bash' "${runtimeShell}" + ''; + + nativeBuildInputs = [ autoconf python3Packages.docutils makeWrapper ]; makeFlags = [ "PREFIX=$(out)" ]; + postInstall = '' + wrapProgram $out/bin/argbash \ + --prefix PATH : '${autoconf}/bin' + ''; + meta = with stdenv.lib; { description = "Bash argument parsing code generator"; homepage = "https://argbash.io/";