nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{ stdenv, fetchFromGitHub, autoconf, runtimeShell, python3Packages, makeWrapper }:
2
3stdenv.mkDerivation rec {
4 pname = "argbash";
5
6 version = "2.8.1";
7
8 src = fetchFromGitHub {
9 owner = "matejak";
10 repo = "argbash";
11 rev = "${version}";
12 sha256 = "0zara7v3pnwiwkpb0x0g37pxhmim4425q4gba712f6djj115r1mr";
13 };
14
15 sourceRoot = "source/resources";
16
17 postPatch = ''
18 chmod -R +w ..
19 patchShebangs ..
20 substituteInPlace Makefile \
21 --replace '/bin/bash' "${runtimeShell}"
22 '';
23
24 nativeBuildInputs = [ autoconf python3Packages.docutils makeWrapper ];
25
26 makeFlags = [ "PREFIX=$(out)" ];
27
28 postInstall = ''
29 wrapProgram $out/bin/argbash \
30 --prefix PATH : '${autoconf}/bin'
31 '';
32
33 meta = with stdenv.lib; {
34 description = "Bash argument parsing code generator";
35 homepage = "https://argbash.io/";
36 license = licenses.free; # custom license. See LICENSE in source repo.
37 maintainers = with maintainers; [ rencire ];
38 };
39}