mdtsql: init at 0.1.0
This commit is contained in:
parent
cb04ce958b
commit
c8fab73198
49
pkgs/by-name/md/mdtsql/package.nix
Normal file
49
pkgs/by-name/md/mdtsql/package.nix
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
{
|
||||||
|
lib,
|
||||||
|
stdenv,
|
||||||
|
buildGoModule,
|
||||||
|
fetchFromGitHub,
|
||||||
|
installShellFiles,
|
||||||
|
buildPackages,
|
||||||
|
nix-update-script,
|
||||||
|
}:
|
||||||
|
buildGoModule rec {
|
||||||
|
pname = "mdtsql";
|
||||||
|
version = "0.1.0";
|
||||||
|
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "noborus";
|
||||||
|
repo = "mdtsql";
|
||||||
|
tag = "v${version}";
|
||||||
|
hash = "sha256-D9suWLrVQOztz0rRjEo+pjxQlGWOOsk3EUbkN9yuriY=";
|
||||||
|
};
|
||||||
|
|
||||||
|
vendorHash = "sha256-psXnLMhrApyBjDY/S4WwIM1GLczyn4dUmX2fWSTq7mQ=";
|
||||||
|
|
||||||
|
nativeBuildInputs = [
|
||||||
|
installShellFiles
|
||||||
|
];
|
||||||
|
|
||||||
|
postInstall = lib.optionalString (stdenv.hostPlatform.emulatorAvailable buildPackages) (
|
||||||
|
let
|
||||||
|
emulator = stdenv.hostPlatform.emulator buildPackages;
|
||||||
|
in
|
||||||
|
''
|
||||||
|
installShellCompletion --cmd mdtsql \
|
||||||
|
--bash <(${emulator} $out/bin/mdtsql completion bash) \
|
||||||
|
--fish <(${emulator} $out/bin/mdtsql completion fish) \
|
||||||
|
--zsh <(${emulator} $out/bin/mdtsql completion zsh)
|
||||||
|
''
|
||||||
|
);
|
||||||
|
|
||||||
|
passthru.updateScript = nix-update-script { };
|
||||||
|
|
||||||
|
meta = {
|
||||||
|
description = "Execute SQL to markdown table and convert to other format";
|
||||||
|
homepage = "https://github.com/noborus/mdtsql";
|
||||||
|
changelog = "https://github.com/noborus/mdtsql/releases/tag/v${version}";
|
||||||
|
license = lib.licenses.mit;
|
||||||
|
maintainers = with lib.maintainers; [ xiaoxiangmoe ];
|
||||||
|
mainProgram = "mdtsql";
|
||||||
|
};
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user