Unverified Commit fdddc8ba authored by Aaron Jheng's avatar Aaron Jheng
Browse files

jump: 0.41.0 -> 0.51.0

parent 9bbb7fb6
Loading
Loading
Loading
Loading
+9 −15
Original line number Diff line number Diff line
{ buildGoModule, fetchFromGitHub, lib }:
{ buildGoModule, fetchFromGitHub, lib, installShellFiles }:

buildGoModule rec {
  pname = "jump";
  version = "0.41.0";
  version = "0.51.0";

  src = fetchFromGitHub {
    owner = "gsamokovarov";
    repo = pname;
    rev = "v${version}";
    sha256 = "sha256-nI4n1WxgdGGP822APBOLZ5lNkjwL1KfP5bKUxfvXdnE=";
    sha256 = "sha256-nlCuotEiAX2+xx7T8jWZo2p4LNLhWXDdcU6DxJprgx0=";
  };

  vendorSha256 = null;
  vendorSha256 = "sha256-nMUqZWdq//q/DNthvpKiYLq8f95O0QoItyX5w4vHzSA=";

  doCheck = false;
  nativeBuildInputs = [ installShellFiles ];

  outputs = [ "out" "man"];
  postInstall = ''
    install -D --mode=444 man/j.1 man/jump.1 -t $man/man/man1/
  ldflags = [ "-s" "-w" ];

    # generate completion scripts for jump
    export HOME="$NIX_BUILD_TOP"
    mkdir -p $out/share/{bash-completion/completions,fish/vendor_completions.d,zsh/site-functions}
    $out/bin/jump shell bash > "$out/share/bash-completion/completions/jump"
    $out/bin/jump shell fish > $out/share/fish/vendor_completions.d/jump.fish
    $out/bin/jump shell zsh > $out/share/zsh/site-functions/_jump
  postInstall = ''
    installManPage man/j.1 man/jump.1
  '';

  meta = with lib; {
@@ -36,6 +30,6 @@ buildGoModule rec {
    '';
    homepage = "https://github.com/gsamokovarov/jump";
    license = licenses.mit;
    maintainers = with maintainers; [ ];
    maintainers = with maintainers; [ aaronjheng ];
  };
}