about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/tools/rust/sqlx-cli/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/tools/rust/sqlx-cli/default.nix')
-rw-r--r--nixpkgs/pkgs/development/tools/rust/sqlx-cli/default.nix29
1 files changed, 29 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/tools/rust/sqlx-cli/default.nix b/nixpkgs/pkgs/development/tools/rust/sqlx-cli/default.nix
new file mode 100644
index 000000000000..c6f34a9e20d2
--- /dev/null
+++ b/nixpkgs/pkgs/development/tools/rust/sqlx-cli/default.nix
@@ -0,0 +1,29 @@
+{ lib, rustPlatform, fetchFromGitHub, pkg-config, openssl }:
+
+rustPlatform.buildRustPackage rec {
+  pname = "sqlx-cli";
+  version = "0.4.2";
+
+  src = fetchFromGitHub {
+    owner = "launchbadge";
+    repo = "sqlx";
+    rev = "v${version}";
+    sha256 = "1q6p4qly9qjn333nj72sar6nbyclfdw9i9l6rnimswylj0rr9n27";
+  };
+
+  cargoSha256 = "1393mwx6iccnqrry4ia4prcnnjxhp4zjq1s3gzwzfyzsrqyad54g";
+
+  doCheck = false;
+  cargoBuildFlags = [ "-p sqlx-cli" ];
+
+  nativeBuildInputs = [ pkg-config ];
+  buildInputs = [ openssl ];
+
+  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 ];
+  };
+}