depot/pkgs/by-name/la/lazysql/package.nix
Luke Granger-Brown 57725ef3ec Squashed 'third_party/nixpkgs/' content from commit 76612b17c0ce
git-subtree-dir: third_party/nixpkgs
git-subtree-split: 76612b17c0ce71689921ca12d9ffdc9c23ce40b2
2024-11-10 23:59:47 +00:00

42 lines
1,011 B
Nix

{ lib
, stdenv
, buildGoModule
, fetchFromGitHub
, testers
, lazysql
, xorg ? null
, darwin ? null
}:
buildGoModule rec {
pname = "lazysql";
version = "0.3.0";
src = fetchFromGitHub {
owner = "jorgerojas26";
repo = "lazysql";
rev = "v${version}";
hash = "sha256-nDiy7LSSUp1cPgtCfLdu7LEh0A+Ga1p5eNVanbQtQ+E=";
};
vendorHash = "sha256-SKNFViwoMzZ1hKKZSvTm0/kKro1IaUVsC+0Pbv7FoAU=";
ldflags = [
"-X main.version=${version}"
];
buildInputs = lib.optionals stdenv.hostPlatform.isLinux [ xorg.libX11 ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Cocoa ];
passthru.tests.version = testers.testVersion {
package = lazysql;
command = "lazysql version";
};
meta = with lib; {
description = "A cross-platform TUI database management tool written in Go";
homepage = "https://github.com/jorgerojas26/lazysql";
license = licenses.mit;
maintainers = with maintainers; [ kanielrkirby ];
mainProgram = "lazysql";
};
}