2024-06-15 11:36:49 -06:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, buildGoModule
|
|
|
|
, fetchFromGitHub
|
2024-11-05 04:28:16 -07:00
|
|
|
, testers
|
|
|
|
, lazysql
|
2024-06-15 11:36:49 -06:00
|
|
|
, xorg ? null
|
|
|
|
, darwin ? null
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "lazysql";
|
2024-10-27 23:47:35 -06:00
|
|
|
version = "0.3.0";
|
2024-06-15 11:36:49 -06:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "jorgerojas26";
|
|
|
|
repo = "lazysql";
|
|
|
|
rev = "v${version}";
|
2024-10-27 23:47:35 -06:00
|
|
|
hash = "sha256-nDiy7LSSUp1cPgtCfLdu7LEh0A+Ga1p5eNVanbQtQ+E=";
|
2024-06-15 11:36:49 -06:00
|
|
|
};
|
|
|
|
|
2024-10-27 23:47:35 -06:00
|
|
|
vendorHash = "sha256-SKNFViwoMzZ1hKKZSvTm0/kKro1IaUVsC+0Pbv7FoAU=";
|
2024-06-15 11:36:49 -06:00
|
|
|
|
2024-11-05 04:28:16 -07:00
|
|
|
ldflags = [
|
|
|
|
"-X main.version=${version}"
|
|
|
|
];
|
|
|
|
|
2024-06-15 11:36:49 -06:00
|
|
|
buildInputs = lib.optionals stdenv.hostPlatform.isLinux [ xorg.libX11 ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Cocoa ];
|
|
|
|
|
2024-11-05 04:28:16 -07:00
|
|
|
passthru.tests.version = testers.testVersion {
|
|
|
|
package = lazysql;
|
|
|
|
command = "lazysql version";
|
|
|
|
};
|
|
|
|
|
2024-06-15 11:36:49 -06:00
|
|
|
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";
|
|
|
|
};
|
|
|
|
}
|