From 16af470a990dbb1fcb85a490682b1723992ca4c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Steve=20Ch=C3=A1vez?= Date: Wed, 22 May 2019 10:26:36 -0500 Subject: [PATCH] Add shell.nix (#1298) --- shell.nix | 19 +++++++++++++++++++ stack.yaml | 2 +- 2 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 shell.nix diff --git a/shell.nix b/shell.nix new file mode 100644 index 000000000..582ac8db2 --- /dev/null +++ b/shell.nix @@ -0,0 +1,19 @@ +with import (builtins.fetchGit { + url = https://github.com/NixOS/nixpkgs-channels; + ref = "nixos-17.09"; + rev = "14f9ee66e63077539252f8b4550049381a082518"; +}) {}; +# alternatively you can add 17.09 to your channels with: +# +# nix-channel --add https://nixos.org/channels/nixos-17.09 nixos-17.09 +# nix-channel --update +# +# and then remove the above and uncomment this line. +#with (import {}); + +haskell.lib.buildStackProject { + name = "postgrest"; + # nixos-17.09 has ghc 8.0.2 by default + # this is the one used by stack lts-9.6 + buildInputs = [ ghc postgresql zlib pcre ]; +} diff --git a/stack.yaml b/stack.yaml index 0f54fbead..0fe40b5a4 100644 --- a/stack.yaml +++ b/stack.yaml @@ -17,7 +17,7 @@ extra-deps: ghc-options: postgrest: -O2 -Werror -Wall -fwarn-identities -fno-warn-redundant-constraints nix: - packages: [postgresql, zlib] + shell-file: shell.nix # only added because of hjsonschema conflict with http-types # once hjsonschema upper bounding on http-types is solved it can be removed allow-newer: true