depot/third_party/nixpkgs/pkgs/development/tools/rust/sqlx-cli/default.nix
Default email 619d6dcc77 Project import generated by Copybara.
GitOrigin-RevId: 870959c7fb3a42af1863bed9e1756086a74eb649
2021-08-22 09:53:02 +02:00

30 lines
1,022 B
Nix

{ stdenv, lib, rustPlatform, fetchFromGitHub, pkg-config, openssl, SystemConfiguration, CoreFoundation, Security, libiconv }:
rustPlatform.buildRustPackage rec {
pname = "sqlx-cli";
version = "0.5.7";
src = fetchFromGitHub {
owner = "launchbadge";
repo = "sqlx";
rev = "v${version}";
sha256 = "sha256-BYTAAzex3h9iEKFuPCyCXKokPLcgA0k9Zk6aMcWac+c=";
};
cargoSha256 = "sha256-3Fdoo8gvoLXe9fEAzKh7XY0LDVGsYsqB6NRlU8NqCMI=";
doCheck = false;
cargoBuildFlags = [ "-p sqlx-cli" ];
nativeBuildInputs = [ pkg-config ];
buildInputs = lib.optionals stdenv.isLinux [ openssl ]
++ lib.optionals stdenv.isDarwin [ SystemConfiguration CoreFoundation Security libiconv ];
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 ];
};
}