5e7c2d6cef
GitOrigin-RevId: f99e5f03cc0aa231ab5950a15ed02afec45ed51a
38 lines
1,002 B
Nix
38 lines
1,002 B
Nix
{ lib, stdenv, fetchCrate, rustPlatform, pkg-config, openssl, Security }:
|
|
|
|
let
|
|
pname = "cargo-pgrx";
|
|
version = "0.10.2";
|
|
in
|
|
rustPlatform.buildRustPackage rec {
|
|
inherit version pname;
|
|
|
|
src = fetchCrate {
|
|
inherit version pname;
|
|
hash = "sha256-FqjfbJmSy5UCpPPPk4bkEyvQCnaH9zYtkI7txgIn+ls=";
|
|
};
|
|
|
|
cargoHash = "sha256-syZ3cQq8qDHBLvqmNDGoxeK6zXHJ47Jwkw3uhaXNCzI=";
|
|
|
|
nativeBuildInputs = [ pkg-config ];
|
|
|
|
buildInputs = [ openssl ]
|
|
++ lib.optionals stdenv.isDarwin [ Security ];
|
|
|
|
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"
|
|
];
|
|
|
|
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 ];
|
|
};
|
|
}
|