nixpkgs/pkgs/development/tools/rust/sqlx-cli/default.nix

31 lines
1023 B
Nix
Raw Normal View History

2021-05-04 23:55:47 +00:00
{ stdenv, lib, rustPlatform, fetchFromGitHub, pkg-config, openssl, SystemConfiguration, CoreFoundation, Security, libiconv }:
2021-01-18 20:37:17 +00:00
rustPlatform.buildRustPackage rec {
pname = "sqlx-cli";
2022-01-01 03:03:04 +00:00
version = "0.5.10";
2021-01-18 20:37:17 +00:00
src = fetchFromGitHub {
owner = "launchbadge";
repo = "sqlx";
rev = "v${version}";
2022-01-01 03:03:04 +00:00
sha256 = "sha256-OBIuURj0C/ws71KTGN9EbMwN4QsGMEdgoWyctmHaHjQ=";
2021-01-18 20:37:17 +00:00
};
2022-01-01 03:03:04 +00:00
cargoSha256 = "sha256-9+I4mi7w1WK2NkmN65EtC52KtSZR9GjrHCPE9w82IXw=";
2021-01-18 20:37:17 +00:00
doCheck = false;
cargoBuildFlags = [ "-p sqlx-cli" ];
nativeBuildInputs = [ pkg-config ];
buildInputs = lib.optionals stdenv.isLinux [ openssl ]
2021-05-04 23:55:47 +00:00
++ lib.optionals stdenv.isDarwin [ SystemConfiguration CoreFoundation Security libiconv ];
2021-01-18 20:37:17 +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 ];
};
}