11 stdenv.mkDerivation rec {
12 pname = "bash-my-aws";
13 version = "unstable-2020-01-11";
15 src = fetchFromGitHub {
16 owner = "bash-my-aws";
18 rev = "5a97ce2c22affca1299022a5afa109d7b62242ba";
19 sha256 = "sha256-RZvaiyRK8FnZbHyLkWz5VrAcsnMtHCiIo64GpNZgvqY=";
25 propagatedBuildInputs = [
31 nativeBuildInputs = [ makeWrapper installShellFiles ];
45 substituteInPlace scripts/build \
46 --replace '~/.bash-my-aws' $out
47 substituteInPlace scripts/build-completions \
48 --replace "{HOME}" $out \
49 --replace '~/.bash-my-aws' $out
51 ./scripts/build-completions
52 substituteInPlace bash_completion.sh \
53 --replace "{HOME}" $out \
54 --replace .bash-my-aws ""
55 substituteInPlace bin/bma \
56 --replace '~/.bash-my-aws' $out
57 wrapProgram $out/bin/bma --prefix PATH : ${lib.makeBinPath [awscli jq unixtools.column bashInteractive ]}
58 installShellCompletion --bash --name bash-my-aws.bash bash_completion.sh
60 patchShebangs --host $out/lib
61 installShellCompletion --bash --name bash-my-aws.bash bash_completion.sh
62 cat > $out/bin/bma-init <<EOF
63 echo source $out/aliases
64 echo source $out/bash_completion.sh
66 chmod +x $out/bin/bma-init
71 homepage = "https://bash-my-aws.org";
72 description = "CLI commands for AWS";
73 license = licenses.mit;
74 maintainers = with maintainers; [ tomberek ];