2023-07-15 17:15:38 +00:00
|
|
|
{ lib, stdenv, fetchCrate, rustPlatform, pkg-config, openssl, Security }:
|
|
|
|
|
|
|
|
let
|
|
|
|
pname = "cargo-pgrx";
|
2024-01-02 11:29:13 +00:00
|
|
|
version = "0.11.2";
|
2023-07-15 17:15:38 +00:00
|
|
|
in
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
inherit version pname;
|
|
|
|
|
|
|
|
src = fetchCrate {
|
|
|
|
inherit version pname;
|
2024-01-02 11:29:13 +00:00
|
|
|
hash = "sha256-8NlpMDFaltTIA8G4JioYm8LaPJ2RGKH5o6sd6lBHmmM=";
|
2023-07-15 17:15:38 +00:00
|
|
|
};
|
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
cargoHash = "sha256-qTb3JV3u42EilaK2jP9oa5D09mkuHyRbGGRs9Rg4TzI=";
|
2023-07-15 17:15:38 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [ pkg-config ];
|
|
|
|
|
|
|
|
buildInputs = [ openssl ]
|
|
|
|
++ lib.optionals stdenv.isDarwin [ Security ];
|
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
preCheck = ''
|
|
|
|
export PGRX_HOME=$(mktemp -d)
|
|
|
|
'';
|
|
|
|
|
|
|
|
checkFlags = [
|
|
|
|
# requires pgrx to be properly initialized with cargo pgrx init
|
|
|
|
"--skip=command::schema::tests::test_parse_managed_postmasters"
|
|
|
|
];
|
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|