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

31 lines
1005 B
Nix
Raw Normal View History

{ stdenv, lib, rustPlatform, fetchFromGitHub, pkg-config, openssl, SystemConfiguration, CoreFoundation, Security }:
2021-01-18 12:37:17 -08:00
rustPlatform.buildRustPackage rec {
pname = "sqlx-cli";
2021-05-03 23:52:59 -07:00
version = "0.5.2";
2021-01-18 12:37:17 -08:00
src = fetchFromGitHub {
owner = "launchbadge";
repo = "sqlx";
rev = "v${version}";
2021-05-03 23:52:59 -07:00
sha256 = "0jz0gddw1xp51rnap0dsyq4886x2glmr087r1lf3fxlnv6anaqn9";
2021-01-18 12:37:17 -08:00
};
2021-05-03 23:52:59 -07:00
cargoSha256 = "046blw366d6zjpq944g9n4cdhhv2w97qfi1ynljc9bnz03d8v39c";
2021-01-18 12:37:17 -08:00
doCheck = false;
cargoBuildFlags = [ "-p sqlx-cli" ];
nativeBuildInputs = [ pkg-config ];
buildInputs = lib.optionals stdenv.isLinux [ openssl ]
++ lib.optionals stdenv.isDarwin [ SystemConfiguration CoreFoundation Security ];
2021-01-18 12:37:17 -08: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 ];
};
}