diff --git a/pkgs/by-name/la/lazysql/package.nix b/pkgs/by-name/la/lazysql/package.nix index a5aed8158ae3..dc3ecec1acc8 100644 --- a/pkgs/by-name/la/lazysql/package.nix +++ b/pkgs/by-name/la/lazysql/package.nix @@ -2,6 +2,8 @@ , stdenv , buildGoModule , fetchFromGitHub +, testers +, lazysql , xorg ? null , darwin ? null }: @@ -19,8 +21,17 @@ buildGoModule rec { 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";