2021-05-20 23:08:51 +00:00
|
|
|
{ stdenv, lib, rustPlatform, fetchFromGitHub, pkg-config, openssl, SystemConfiguration, CoreFoundation, Security, libiconv }:
|
2021-02-05 17:12:51 +00:00
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "sqlx-cli";
|
2021-12-06 16:07:01 +00:00
|
|
|
version = "0.5.9";
|
2021-02-05 17:12:51 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "launchbadge";
|
|
|
|
repo = "sqlx";
|
|
|
|
rev = "v${version}";
|
2021-12-06 16:07:01 +00:00
|
|
|
sha256 = "sha256-z8gIuMknqiXpmXANS+V1GYioevCysDDzb+UYc9NeU04=";
|
2021-02-05 17:12:51 +00:00
|
|
|
};
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
cargoSha256 = "sha256-b+X4u83Jae2xjKFT4lYqSk125wPQjMiM8wZ36tA/rjo=";
|
2021-02-05 17:12:51 +00:00
|
|
|
|
|
|
|
doCheck = false;
|
|
|
|
cargoBuildFlags = [ "-p sqlx-cli" ];
|
|
|
|
|
|
|
|
nativeBuildInputs = [ pkg-config ];
|
2021-03-20 04:20:00 +00:00
|
|
|
buildInputs = lib.optionals stdenv.isLinux [ openssl ]
|
2021-05-20 23:08:51 +00:00
|
|
|
++ lib.optionals stdenv.isDarwin [ SystemConfiguration CoreFoundation Security libiconv ];
|
2021-02-05 17:12:51 +00:00
|
|
|
|
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|