nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at 21.05 30 lines 1.0 kB view raw
1{ stdenv, lib, rustPlatform, fetchFromGitHub, pkg-config, openssl, SystemConfiguration, CoreFoundation, Security, libiconv }: 2 3rustPlatform.buildRustPackage rec { 4 pname = "sqlx-cli"; 5 version = "0.5.2"; 6 7 src = fetchFromGitHub { 8 owner = "launchbadge"; 9 repo = "sqlx"; 10 rev = "v${version}"; 11 sha256 = "0jz0gddw1xp51rnap0dsyq4886x2glmr087r1lf3fxlnv6anaqn9"; 12 }; 13 14 cargoSha256 = "046blw366d6zjpq944g9n4cdhhv2w97qfi1ynljc9bnz03d8v39c"; 15 16 doCheck = false; 17 cargoBuildFlags = [ "-p sqlx-cli" ]; 18 19 nativeBuildInputs = [ pkg-config ]; 20 buildInputs = lib.optionals stdenv.isLinux [ openssl ] 21 ++ lib.optionals stdenv.isDarwin [ SystemConfiguration CoreFoundation Security libiconv ]; 22 23 meta = with lib; { 24 description = 25 "SQLx's associated command-line utility for managing databases, migrations, and enabling offline mode with sqlx::query!() and friends."; 26 homepage = "https://github.com/launchbadge/sqlx"; 27 license = licenses.asl20; 28 maintainers = with maintainers; [ greizgh ]; 29 }; 30}