Files
postgrest/shell.nix
T
Wolfgang WaltherandWolfgang Walther d218a9eaff dev: improve postgrest-watch experience
* speed up io tests
* avoid infinite loop while watching io tests
* improve auto-complete with postgrest-watch postgrest-run
* detect when files are added or deleted
2020-12-05 16:47:50 +01:00

46 lines
1.2 KiB
Nix

# The additional modules below have large dependencies and are therefore
# disabled by default. You can activate them by passing arguments to nix-shell,
# e.g.:
#
# nix-shell --arg release true
#
# This will provide you with a shell where the `postgrest-release-*` scripts
# are available.
#
# We highly recommend that use the PostgREST binary cache by installing cachix
# (https://app.cachix.org/) and running `cachix use postgrest`.
{ memoryTests ? false, docker ? false, release ? false }:
let
postgrest =
import ./default.nix;
pkgs =
postgrest.pkgs;
lib =
pkgs.lib;
in
lib.overrideDerivation postgrest.env (
base: {
buildInputs =
base.buildInputs ++ [
pkgs.cabal-install
pkgs.cabal2nix
pkgs.postgresql
postgrest.nixpkgsUpgrade
postgrest.devtools
postgrest.tests
postgrest.style
]
++ lib.optional memoryTests postgrest.tests.memoryTests
++ lib.optional docker postgrest.docker
++ lib.optional release postgrest.release;
shellHook =
''
source ${pkgs.bashCompletion}/etc/profile.d/bash_completion.sh
complete -F _command postgrest-watch
'';
}
)