summary refs log tree commit diff
path: root/pkgs/development/tools/rust/cargo-pgrx
diff options
context:
space:
mode:
authorhappysalada <raphael@megzari.com>2023-06-06 18:53:23 -0400
committerYt <happysalada@tuta.io>2023-06-07 05:01:35 -0400
commitbfafd5c86a09c6c57c43a0b79b4ec51bedc60183 (patch)
tree9f60c9ba0b3607a0298b9f95e1192421ae7c635e /pkgs/development/tools/rust/cargo-pgrx
parent66f57b6c181c3ad3ac9692664b4a210d074d47c6 (diff)
cargo-pgrx: init at 0.9.2
Diffstat (limited to 'pkgs/development/tools/rust/cargo-pgrx')
-rw-r--r--pkgs/development/tools/rust/cargo-pgrx/default.nix29
1 files changed, 29 insertions, 0 deletions
diff --git a/pkgs/development/tools/rust/cargo-pgrx/default.nix b/pkgs/development/tools/rust/cargo-pgrx/default.nix
new file mode 100644
index 0000000000000..4a00caf9fed99
--- /dev/null
+++ b/pkgs/development/tools/rust/cargo-pgrx/default.nix
@@ -0,0 +1,29 @@
+{ lib, stdenv, fetchCrate, rustPlatform, pkg-config, openssl, Security }:
+
+let
+  pname = "cargo-pgrx";
+  version = "0.9.2";
+in
+rustPlatform.buildRustPackage rec {
+  inherit version pname;
+
+  src = fetchCrate {
+    inherit version pname;
+    hash = "sha256-z5YmeUBXLyPfodKAI/t2I4sMg0nbdo0thTgoT/kSuwo=";
+  };
+
+  cargoHash = "sha256-Ox/jk2+cLNpfBU5IxILMPYaFi56BmfehmA+WDaEkae0=";
+
+  nativeBuildInputs = [ pkg-config ];
+
+  buildInputs = [ openssl ]
+    ++ lib.optionals stdenv.isDarwin [ Security ];
+
+  meta = with lib; {
+    description = "Build Postgres Extensions with Rust!";
+    homepage = "https://github.com/tcdi/pgrx";
+    changelog = "https://github.com/tcdi/pgrx/releases/tag/v${version}";
+    license = licenses.mit;
+    maintainers = with maintainers; [ happysalada ];
+  };
+}