File tree Expand file tree Collapse file tree 1 file changed +16
-5
lines changed Expand file tree Collapse file tree 1 file changed +16
-5
lines changed Original file line number Diff line number Diff line change 7777 create_control_files
7878 '' ;
7979
80+ pgrxBinaryName = if builtins . compareVersions "0.7.4" pgrxVersion >= 0 then "pgx" else "pgrx" ;
81+
8082 preCheck = ''
81- export PGRX_HOME=$(mktemp -d)
82- export NIX_PGLIBDIR=$PGRX_HOME/${ lib . versions . major postgresql . version } /lib
83- ${ lib . getExe rsync } --chmod=ugo+w -a ${ postgresql } / ${ postgresql . lib } / $PGRX_HOME/${ lib . versions . major postgresql . version } /
84- cargo pgrx init --pg${ lib . versions . major postgresql . version } $PGRX_HOME/${ lib . versions . major postgresql . version } /bin/pg_config
83+ export PGRX_HOME="$(mktemp -d)"
84+ export PG_VERSION="${ lib . versions . major postgresql . version } "
85+ export NIX_PGLIBDIR="$PGRX_HOME/$PG_VERSION/lib"
86+ export PATH="$PGRX_HOME/$PG_VERSION/bin:$PATH"
87+ ${ lib . getExe rsync } --chmod=ugo+w -a ${ postgresql } / ${ postgresql . lib } / "$PGRX_HOME/$PG_VERSION/"
88+ cargo ${ pgrxBinaryName } init "--pg$PG_VERSION" "$PGRX_HOME/$PG_VERSION/bin/pg_config"
89+ cargo ${ pgrxBinaryName } install --release --features "pg$PG_VERSION"
8590 '' ;
8691
87- doCheck = false ;
92+ doCheck = true ;
93+
94+ checkPhase = ''
95+ runHook preCheck
96+ bash -x ./bin/installcheck
97+ runHook postCheck
98+ '' ;
8899
89100 meta = with lib ; {
90101 description = "GraphQL support for PostreSQL" ;
You can’t perform that action at this time.
0 commit comments