1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-18 19:17:17 +00:00
nixpkgs/pkgs/development/tools/misc/argbash/default.nix
2020-08-01 15:56:28 +00:00

40 lines
970 B
Nix

{ stdenv, fetchFromGitHub, autoconf, runtimeShell, python3Packages, makeWrapper }:
stdenv.mkDerivation rec {
pname = "argbash";
version = "2.9.0";
src = fetchFromGitHub {
owner = "matejak";
repo = "argbash";
rev = "${version}";
sha256 = "1h6kw510r43b6d6rjhkhw4d67nc7grak4mgqs9ngjjv07qj3qfqc";
};
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 ];
};
}