mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-04 19:45:54 +00:00
8539d5f48f
* 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
40 lines
970 B
Nix
40 lines
970 B
Nix
{ stdenv, fetchFromGitHub, autoconf, runtimeShell, python3Packages, makeWrapper }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "argbash";
|
|
|
|
version = "2.8.1";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "matejak";
|
|
repo = "argbash";
|
|
rev = "${version}";
|
|
sha256 = "0zara7v3pnwiwkpb0x0g37pxhmim4425q4gba712f6djj115r1mr";
|
|
};
|
|
|
|
sourceRoot = "source/resources";
|
|
|
|
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/";
|
|
license = licenses.free; # custom license. See LICENSE in source repo.
|
|
maintainers = with maintainers; [ rencire ];
|
|
};
|
|
}
|