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";
|
2022-01-03 16:56:52 +00:00
|
|
|
version = "0.5.10";
|
2021-02-05 17:12:51 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "launchbadge";
|
|
|
|
repo = "sqlx";
|
|
|
|
rev = "v${version}";
|
2022-01-03 16:56:52 +00:00
|
|
|
sha256 = "sha256-OBIuURj0C/ws71KTGN9EbMwN4QsGMEdgoWyctmHaHjQ=";
|
2021-02-05 17:12:51 +00:00
|
|
|
};
|
|
|
|
|
2022-01-03 16:56:52 +00:00
|
|
|
cargoSha256 = "sha256-9+I4mi7w1WK2NkmN65EtC52KtSZR9GjrHCPE9w82IXw=";
|
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 ];
|
|
|
|
};
|
|
|
|
}
|