cargo-pgrx: expose more versions
This commit is contained in:
parent
75ec5287b4
commit
22ba1a22d7
|
@ -1,39 +1,74 @@
|
||||||
{ lib, stdenv, fetchCrate, rustPlatform, pkg-config, openssl, Security }:
|
{ lib
|
||||||
|
, darwin
|
||||||
|
, fetchCrate
|
||||||
|
, openssl
|
||||||
|
, pkg-config
|
||||||
|
, rustPlatform
|
||||||
|
, stdenv
|
||||||
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
pname = "cargo-pgrx";
|
generic =
|
||||||
version = "0.11.2";
|
{ version
|
||||||
in
|
, hash
|
||||||
rustPlatform.buildRustPackage rec {
|
, cargoHash
|
||||||
inherit version pname;
|
}:
|
||||||
|
rustPlatform.buildRustPackage rec {
|
||||||
|
pname = "cargo-pgrx";
|
||||||
|
|
||||||
src = fetchCrate {
|
inherit version;
|
||||||
inherit version pname;
|
|
||||||
hash = "sha256-8NlpMDFaltTIA8G4JioYm8LaPJ2RGKH5o6sd6lBHmmM=";
|
src = fetchCrate {
|
||||||
|
inherit version pname hash;
|
||||||
|
};
|
||||||
|
|
||||||
|
inherit cargoHash;
|
||||||
|
|
||||||
|
nativeBuildInputs = lib.optionals stdenv.isLinux [
|
||||||
|
pkg-config
|
||||||
|
];
|
||||||
|
|
||||||
|
buildInputs = lib.optionals stdenv.isLinux [
|
||||||
|
openssl
|
||||||
|
] ++ lib.optionals stdenv.isDarwin [
|
||||||
|
darwin.apple_sdk.frameworks.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/pgcentralfoundation/pgrx";
|
||||||
|
changelog = "https://github.com/pgcentralfoundation/pgrx/releases/tag/v${version}";
|
||||||
|
license = licenses.mit;
|
||||||
|
maintainers = with maintainers; [ happysalada ];
|
||||||
|
mainProgram = "cargo-pgrx";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
in
|
||||||
|
{
|
||||||
|
cargo-pgrx_0_10_2 = generic {
|
||||||
|
version = "0.10.2";
|
||||||
|
hash = "sha256-FqjfbJmSy5UCpPPPk4bkEyvQCnaH9zYtkI7txgIn+ls=";
|
||||||
|
cargoHash = "sha256-syZ3cQq8qDHBLvqmNDGoxeK6zXHJ47Jwkw3uhaXNCzI=";
|
||||||
};
|
};
|
||||||
|
|
||||||
cargoHash = "sha256-qTb3JV3u42EilaK2jP9oa5D09mkuHyRbGGRs9Rg4TzI=";
|
cargo-pgrx_0_11_2 = generic {
|
||||||
|
version = "0.11.2";
|
||||||
|
hash = "sha256-8NlpMDFaltTIA8G4JioYm8LaPJ2RGKH5o6sd6lBHmmM=";
|
||||||
|
cargoHash = "sha256-qTb3JV3u42EilaK2jP9oa5D09mkuHyRbGGRs9Rg4TzI=";
|
||||||
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [ pkg-config ];
|
cargo-pgrx_0_11_3 = generic {
|
||||||
|
version = "0.11.3";
|
||||||
buildInputs = [ openssl ]
|
hash = "sha256-UHIfwOdXoJvR4Svha6ud0FxahP1wPwUtviUwUnTmLXU=";
|
||||||
++ lib.optionals stdenv.isDarwin [ Security ];
|
cargoHash = "sha256-j4HnD8Zt9uhlV5N7ldIy9564o9qFEqs5KfXHmnQ1WEw=";
|
||||||
|
|
||||||
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!";
|
|
||||||
mainProgram = "cargo-pgrx";
|
|
||||||
homepage = "https://github.com/tcdi/pgrx";
|
|
||||||
changelog = "https://github.com/tcdi/pgrx/releases/tag/v${version}";
|
|
||||||
license = licenses.mit;
|
|
||||||
maintainers = with maintainers; [ happysalada ];
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -16830,9 +16830,13 @@ with pkgs;
|
||||||
buildPgxExtension = callPackage ../development/tools/rust/cargo-pgx/buildPgxExtension.nix {
|
buildPgxExtension = callPackage ../development/tools/rust/cargo-pgx/buildPgxExtension.nix {
|
||||||
inherit (darwin.apple_sdk.frameworks) Security;
|
inherit (darwin.apple_sdk.frameworks) Security;
|
||||||
};
|
};
|
||||||
cargo-pgrx = callPackage ../development/tools/rust/cargo-pgrx/default.nix {
|
inherit (callPackages ../development/tools/rust/cargo-pgrx { })
|
||||||
inherit (darwin.apple_sdk.frameworks) Security;
|
cargo-pgrx_0_10_2
|
||||||
};
|
cargo-pgrx_0_11_2
|
||||||
|
cargo-pgrx_0_11_3
|
||||||
|
;
|
||||||
|
cargo-pgrx = cargo-pgrx_0_11_2;
|
||||||
|
|
||||||
buildPgrxExtension = callPackage ../development/tools/rust/cargo-pgrx/buildPgrxExtension.nix {
|
buildPgrxExtension = callPackage ../development/tools/rust/cargo-pgrx/buildPgrxExtension.nix {
|
||||||
inherit (darwin.apple_sdk.frameworks) Security;
|
inherit (darwin.apple_sdk.frameworks) Security;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue
Block a user