diff --git a/.circleci/config.yml b/.circleci/config.yml index 18c57b580..c4f7105ab 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -88,39 +88,22 @@ jobs: style: docker: - - image: circleci/buildpack-deps:trusty + - image: nixos/nix:2.3 steps: - checkout - - restore_cache: - keys: - - v1-stack-style-dependencies-{{ checksum "stack.yaml" }} - run: - name: install stack + name: Install linting and styling scripts + command: nix-env -f default.nix -iA lint style + - run: + name: Run linter command: | - curl -L https://github.com/commercialhaskell/stack/releases/download/v2.1.3/stack-2.1.3-linux-x86_64.tar.gz | tar zx -C /tmp - sudo mv /tmp/stack-2.1.3-linux-x86_64/stack /usr/bin - stack setup + echo 'Note: For checking this locally, use `make lint`. Or, if using `nix`, run `nix-shell --run postgrest-lint`' + postgrest-lint - run: - name: install linters + name: Run style check command: | - # -fno-spec-constr may help with out-of-memory issues compiling - # haskell-src-exts. Compare stack.yaml. - stack install --ghc-options=-fno-spec-constr hlint stylish-haskell - - save_cache: - paths: - - "~/.stack" - - ".stack-work" - key: v1-stack-style-dependencies-{{ checksum "stack.yaml" }} - - run: - name: Add stack tools to $PATH - command: | - echo "export PATH=/home/circleci/.local/bin:$PATH" >> $BASH_ENV - - run: - name: run linter - command: make lint - - run: - name: run styler - command: make style + echo 'Note: For checking this locally, use `make style`. Or, if using `nix`, run `nix-shell --run postgrest-style`' + postgrest-style-check build-test-9.4: docker: diff --git a/nix/overlays/haskell-packages/protolude.nix b/nix/overlays/haskell-packages/protolude.nix index 9b426f12c..97f2ef398 100644 --- a/nix/overlays/haskell-packages/protolude.nix +++ b/nix/overlays/haskell-packages/protolude.nix @@ -1,6 +1,19 @@ -{ mkDerivation, array, async, base, bytestring, containers, deepseq -, ghc-prim, hashable, mtl, mtl-compat, stdenv, stm, text -, transformers, transformers-compat +{ mkDerivation +, array +, async +, base +, bytestring +, containers +, deepseq +, ghc-prim +, hashable +, mtl +, mtl-compat +, stdenv +, stm +, text +, transformers +, transformers-compat }: mkDerivation { pname = "protolude"; @@ -9,8 +22,20 @@ mkDerivation { isLibrary = true; isExecutable = true; libraryHaskellDepends = [ - array async base bytestring containers deepseq ghc-prim hashable - mtl mtl-compat stm text transformers transformers-compat + array + async + base + bytestring + containers + deepseq + ghc-prim + hashable + mtl + mtl-compat + stm + text + transformers + transformers-compat ]; homepage = "https://github.com/sdiehl/protolude"; description = "A small prelude";