depot/third_party/nixpkgs/pkgs/development/tools/rust/sqlx-cli/default.nix
Default email 02cf88bb76 Project import generated by Copybara.
GitOrigin-RevId: c4a0efdd5a728e20791b8d8d2f26f90ac228ee8d
2022-08-12 15:06:08 +03:00

35 lines
1.1 KiB
Nix

{ stdenv, lib, rustPlatform, fetchFromGitHub, pkg-config, openssl, SystemConfiguration, CoreFoundation, Security, libiconv, testers, sqlx-cli }:
rustPlatform.buildRustPackage rec {
pname = "sqlx-cli";
version = "0.6.1";
src = fetchFromGitHub {
owner = "launchbadge";
repo = "sqlx";
rev = "v${version}";
sha256 = "sha256-4XJ0dNbACCcbN5+d05H++jlRKuL+au3iOLMoBR/whOs=";
};
cargoSha256 = "sha256-sIe+uVCzTVUTePNIBekCA/uwRG+GWGonnvzhRDwh5Y4=";
doCheck = false;
cargoBuildFlags = [ "-p sqlx-cli" ];
nativeBuildInputs = [ pkg-config ];
buildInputs = lib.optionals stdenv.isLinux [ openssl ]
++ lib.optionals stdenv.isDarwin [ SystemConfiguration CoreFoundation Security libiconv ];
passthru.tests.version = testers.testVersion {
package = sqlx-cli;
command = "sqlx --version";
};
meta = with lib; {
description =
"SQLx's associated command-line utility for managing databases, migrations, and enabling offline mode with sqlx::query!() and friends.";
homepage = "https://github.com/launchbadge/sqlx";
license = licenses.asl20;
maintainers = with maintainers; [ greizgh ];
};
}