about summary refs log tree commit diff
path: root/nixpkgs/pkgs/by-name/ku/kubectl-neat/package.nix
blob: 82ba45377ac45f974853aceb66e49c653947d74f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
{ lib, buildGoModule, fetchFromGitHub, bash }:

buildGoModule rec {
  pname = "kubectl-neat";
  version = "2.0.3";

  src = fetchFromGitHub {
    owner = "itaysk";
    repo = "kubectl-neat";
    rev = "v${version}";
    hash = "sha256-j8v0zJDBqHzmLamIZPW9UvMe9bv/m3JUQKY+wsgMTFk=";
  };

  vendorHash = "sha256-vGXoYR0DT9V1BD/FN/4szOal0clsLlqReTFkAd2beMw=";

  postBuild = ''
    # Replace path to bash in a script
    # Without this change, there's a problem when running tests
    sed 's,#!/bin/bash,#!${bash}/bin/bash,' -i test/kubectl-stub
  '';

  meta = with lib; {
    description = "Clean up Kubernetes yaml and json output to make it readable";
    mainProgram = "kubectl-neat";
    homepage = "https://github.com/itaysk/kubectl-neat";
    changelog = "https://github.com/itaysk/kubectl-neat/releases/tag/v${version}";
    license = licenses.asl20;
    maintainers = [ maintainers.koralowiec ];
  };
}