diff --git a/shell.nix b/shell.nix index c5b561eaa..1274430f9 100644 --- a/shell.nix +++ b/shell.nix @@ -1,4 +1,4 @@ -{ nixpkgs ? import {}, compiler ? "ghc802" }: +{ nixpkgs ? import {}, compiler ? "ghc822" }: let inherit (nixpkgs) pkgs; @@ -22,7 +22,7 @@ let ''; override = oldAttrs: { - nativeBuildInputs = oldAttrs.nativeBuildInputs ++ (with pkgs; [ postgresql ]) ++ (with haskellPackages; [ stack yesod-bin ]); + nativeBuildInputs = oldAttrs.nativeBuildInputs ++ (with pkgs; [ postgresql cabal-install ]) ++ (with haskellPackages; [ stack yesod-bin ]); shellHook = '' ${oldAttrs.shellHook} export PROMPT_INFO="${oldAttrs.name}" @@ -36,12 +36,12 @@ let psql -f ${postgresSchema} postgres printf "Postgres logfile is %s\nPostgres socket directory is %s\n" ''${pgLogFile} ''${pgSockDir} - env --unset=shellHook zsh - ret=$? + cleanup() { + pg_ctl stop -D ''${pgDir} + rm -rvf ''${pgDir} ''${pgSockDir} ''${pgLogFile} + } - pg_ctl stop -D ''${pgDir} - rm -rvf ''${pgDir} ''${pgSockDir} ''${pgLogFile} - exit ''${ret} + trap cleanup EXIT ''; }; diff --git a/stack.yaml b/stack.yaml index 8cb20da7f..7530e7647 100644 --- a/stack.yaml +++ b/stack.yaml @@ -1,4 +1,5 @@ flags: {} + docker: enable: false image: uniworx @@ -6,35 +7,40 @@ nix: packages: [] pure: false shell-file: ./stack.nix + extra-package-dbs: [] + packages: -- . -- location: - git: https://github.com/pngwjpgh/zip-stream.git - commit: 9272bbed000928d500febad1cdc98d1da29d399e - extra-dep: true -- location: - git: https://github.com/mlitchard/yesod-auth-ldap.git - commit: 69e08ef687ab96df3352ff4267562135453c6f02 - extra-dep: true -- location: - git: https://github.com/mlitchard/authenticate-ldap.git - commit: cc2770024766a8fa29d3086688df60aaf65fb954 - extra-dep: true + - . + - location: + git: https://github.com/pngwjpgh/zip-stream.git + commit: 9272bbed000928d500febad1cdc98d1da29d399e + extra-dep: true + - location: + git: https://github.com/mlitchard/yesod-auth-ldap.git + commit: 69e08ef687ab96df3352ff4267562135453c6f02 + extra-dep: true + - location: + git: https://github.com/mlitchard/authenticate-ldap.git + commit: cc2770024766a8fa29d3086688df60aaf65fb954 + extra-dep: true + - location: + git: https://github.com/pngwjpgh/encoding.git + commit: 67bb87ceff53f0178c988dd4e15eeb2daee92b84 + extra-dep: true + extra-deps: -- colonnade-1.1.1 -- yesod-colonnade-1.1.0 -# - zip-stream-0.1.0.1 -- conduit-resumablesink-0.2 -- uuid-crypto-1.4.0.0 -- filepath-crypto-0.1.0.0 -- cryptoids-0.5.0.0 -- cryptoids-types-0.0.0 -- cryptoids-class-0.0.0 + - colonnade-1.1.1 + - yesod-colonnade-1.1.0 -- encoding-0.8.2 -- regex-compat-0.93.1 + - conduit-resumablesink-0.2 -- LDAP-0.6.11 -resolver: lts-9.3 -allow-newer: true + - uuid-crypto-1.4.0.0 + - filepath-crypto-0.1.0.0 + - cryptoids-0.5.0.0 + - cryptoids-types-0.0.0 + - cryptoids-class-0.0.0 + + - LDAP-0.6.11 + +resolver: lts-10.5