biglybt: 3.5.0.0 -> 3.6.0.0
[NixPkgs.git] / pkgs / development / tools / rust / cargo-pgrx / default.nix
blob3aa7003b756774f182ffc1ef466ef73ce203feb7
1 { lib
2 , darwin
3 , fetchCrate
4 , openssl
5 , pkg-config
6 , rustPlatform
7 , stdenv
8 }:
10 let
11   generic =
12     { version
13     , hash
14     , cargoHash
15     }:
16     rustPlatform.buildRustPackage rec {
17       pname = "cargo-pgrx";
19       inherit version;
21       src = fetchCrate {
22         inherit version pname hash;
23       };
25       inherit cargoHash;
27       nativeBuildInputs = lib.optionals stdenv.isLinux [
28         pkg-config
29       ];
31       buildInputs = lib.optionals stdenv.isLinux [
32         openssl
33       ] ++ lib.optionals stdenv.isDarwin [
34         darwin.apple_sdk.frameworks.Security
35       ];
37       preCheck = ''
38         export PGRX_HOME=$(mktemp -d)
39       '';
41       checkFlags = [
42         # requires pgrx to be properly initialized with cargo pgrx init
43         "--skip=command::schema::tests::test_parse_managed_postmasters"
44       ];
46       meta = with lib; {
47         description = "Build Postgres Extensions with Rust";
48         homepage = "https://github.com/pgcentralfoundation/pgrx";
49         changelog = "https://github.com/pgcentralfoundation/pgrx/releases/tag/v${version}";
50         license = licenses.mit;
51         maintainers = with maintainers; [ happysalada ];
52         mainProgram = "cargo-pgrx";
53       };
54     };
57   cargo-pgrx_0_10_2 = generic {
58     version = "0.10.2";
59     hash = "sha256-FqjfbJmSy5UCpPPPk4bkEyvQCnaH9zYtkI7txgIn+ls=";
60     cargoHash = "sha256-syZ3cQq8qDHBLvqmNDGoxeK6zXHJ47Jwkw3uhaXNCzI=";
61   };
63   cargo-pgrx_0_11_2 = generic {
64     version = "0.11.2";
65     hash = "sha256-8NlpMDFaltTIA8G4JioYm8LaPJ2RGKH5o6sd6lBHmmM=";
66     cargoHash = "sha256-qTb3JV3u42EilaK2jP9oa5D09mkuHyRbGGRs9Rg4TzI=";
67   };
69   cargo-pgrx_0_11_3 = generic {
70     version = "0.11.3";
71     hash = "sha256-UHIfwOdXoJvR4Svha6ud0FxahP1wPwUtviUwUnTmLXU=";
72     cargoHash = "sha256-j4HnD8Zt9uhlV5N7ldIy9564o9qFEqs5KfXHmnQ1WEw=";
73   };