Unverified Commit 1c498560 authored by Nikolay Korotkiy's avatar Nikolay Korotkiy Committed by GitHub
Browse files

csvtk: 0.30.0 -> 0.31.0 (#352877)

parents 93d9c993 60263374
Loading
Loading
Loading
Loading
+23 −3
Original line number Diff line number Diff line
{
  lib,
  stdenv,
  buildGoModule,
  fetchFromGitHub,
  installShellFiles,
  buildPackages,
}:
let
  version = "0.30.0";
  version = "0.31.0";
in
buildGoModule {
  pname = "csvtk";
@@ -14,10 +17,27 @@ buildGoModule {
    owner = "shenwei356";
    repo = "csvtk";
    rev = "refs/tags/v${version}";
    hash = "sha256-xq56dErO0vjG9bZ5aISIFWX4IOHaQksE9W1is2HiFuQ=";
    hash = "sha256-RfW7SiRcsN0F/+2bixLMNsqJCOSD1BQwlm4Zm2kogXM=";
  };

  vendorHash = "sha256-wJedDF7QIg8oWc/QX+rZDyq/nkAW+PMb8EYb0RGJxQM=";
  vendorHash = "sha256-5RqAtnGioasbQxLltglCWitzb7mQgNYIE9IFkE0AOME=";

  nativeBuildInputs = [ installShellFiles ];

  postInstall =
    let
      csvtkBin =
        if stdenv.buildPlatform.canExecute stdenv.hostPlatform then
          "$out"
        else
          lib.getBin buildPackages.csvtk;
    in
    ''
      for shell in bash zsh fish; do
        ${csvtkBin}/bin/csvtk genautocomplete --shell $shell --file csvtk.$shell
        installShellCompletion csvtk.$shell
      done
    '';

  meta = {
    description = "Cross-platform, efficient and practical CSV/TSV toolkit in Golang";