Created
March 10, 2019 16:41
-
-
Save yorickvP/1fce4cbceb96bb1a11f786880d6e804f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| withPostgreSQL = drv: pkgs.haskell.lib.overrideCabal drv (a: { | |
| testToolDepends = (a.testToolDepends or []) ++ | |
| [ pkgs.ephemeralpg pkgs.postgresql pkgs.getopt ]; | |
| preCheck = (a.preCheck or "") + '' | |
| export TEST_PG_CONN_STRING=$(pg_tmp -w 600) | |
| ''; | |
| # we need the temporary directory from pg_tmp | |
| # so extract it out of $TEST_PG_CONN_STRING | |
| postCheck = (a.postCheck or "") + '' | |
| pg_tmp stop -d $(echo ''${TEST_PG_CONN_STRING#*=} | sed 's:%2F:/:g') | |
| ''; | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment