From b40094d01cfabbbe4e1834821719ea72996b9d1d Mon Sep 17 00:00:00 2001 From: Brandon Martin Date: Wed, 29 Jul 2015 08:06:47 -0600 Subject: [PATCH] convenience scripts and nix updates --- .gitignore | 2 +- scripts/clear-sandbox.sh | 26 +++++++++++++++++++ scripts/update-defaults-nix.sh | 20 --------------- scripts/update-nix-files.sh | 46 ++++++++++++++++++++++++++++++++++ servant-blaze/default.nix | 10 ++++++++ servant-blaze/shell.nix | 18 +++++++++++++ servant-client/default.nix | 2 +- servant-client/shell.nix | 18 +++++++++++++ servant-docs/default.nix | 15 +++++------ servant-docs/shell.nix | 25 ++++++++++++------ servant-examples/default.nix | 22 ++++++++++++++++ servant-examples/shell.nix | 18 +++++++++++++ servant-js/default.nix | 2 +- servant-js/shell.nix | 18 +++++++++++++ servant-lucid/default.nix | 10 ++++++++ servant-lucid/shell.nix | 18 +++++++++++++ servant-mock/default.nix | 17 +++++++++++++ servant-mock/shell.nix | 18 +++++++++++++ servant-server/default.nix | 24 ++++++++++-------- servant-server/shell.nix | 18 +++++++++++++ servant/default.nix | 16 ++++++------ servant/shell.nix | 20 +++++++++++++-- 22 files changed, 325 insertions(+), 58 deletions(-) create mode 100755 scripts/clear-sandbox.sh delete mode 100755 scripts/update-defaults-nix.sh create mode 100755 scripts/update-nix-files.sh create mode 100644 servant-blaze/default.nix create mode 100644 servant-blaze/shell.nix create mode 100644 servant-client/shell.nix create mode 100644 servant-examples/default.nix create mode 100644 servant-examples/shell.nix create mode 100644 servant-js/shell.nix create mode 100644 servant-lucid/default.nix create mode 100644 servant-lucid/shell.nix create mode 100644 servant-mock/default.nix create mode 100644 servant-mock/shell.nix create mode 100644 servant-server/shell.nix diff --git a/.gitignore b/.gitignore index 94a7b5d1..60c22d78 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ -/dist +**/*/dist /bin /lib /share diff --git a/scripts/clear-sandbox.sh b/scripts/clear-sandbox.sh new file mode 100755 index 00000000..440e603c --- /dev/null +++ b/scripts/clear-sandbox.sh @@ -0,0 +1,26 @@ +#!/bin/bash - +#=============================================================================== +# +# FILE: clear-sandbox.sh +# +# USAGE: ./clear-sandbox.sh +# +# DESCRIPTION: Clear sandbox at top-level and at all packages +# +# REQUIREMENTS: bash >= 4 +#=============================================================================== + +set -o nounset +set -o errexit + +DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) +. "$DIR"/lib/common.sh + +clear_sandbox () { + rm -rf .cabal-sandbox cabal.sandbox.config + for s in ${SOURCES[@]} ; do + (cd "$s" && rm -rf cabal.sandbox.config dist) + done +} + +clear_sandbox diff --git a/scripts/update-defaults-nix.sh b/scripts/update-defaults-nix.sh deleted file mode 100755 index fb70bb82..00000000 --- a/scripts/update-defaults-nix.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/bash - -#=============================================================================== -# -# USAGE: ./update-defaults-nix.sh -# -# DESCRIPTION: Updates the default.nix files in all source dirs -# -# REQUIREMENTS: cabal2nix, bash >= 4 -#=============================================================================== - -set -o nounset -set -o errexit - -DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) -. "$DIR"/lib/common.sh - -for s in ${SOURCES[@]} ; do - echo $s - (cd "$BASE_DIR/$s" && cabal2nix . > default.nix ) -done diff --git a/scripts/update-nix-files.sh b/scripts/update-nix-files.sh new file mode 100755 index 00000000..33ecea25 --- /dev/null +++ b/scripts/update-nix-files.sh @@ -0,0 +1,46 @@ +#!/bin/bash - +#=============================================================================== +# +# FILE: update-nix-files.sh +# +# USAGE: ./update-nix-files.sh +# +# DESCRIPTION: Update nix files at top-level and add all packages +# +# REQUIREMENTS: bash >= 4, cabal2nix(nix tool) +#=============================================================================== + +set -o nounset +set -o errexit + +DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) +. "$DIR"/lib/common.sh +SHELLNIX="shell.nix" + +write-package-shell-nix () { + rm -rf $SHELLNIX + echo -e "let" >> $SHELLNIX + echo -e " pkgs = import {};" >> $SHELLNIX + echo -e "" >> $SHELLNIX + echo -e " haskellPackages = pkgs.haskellPackages.override {" >> $SHELLNIX + echo -e " overrides = self: super: {" >> $SHELLNIX + for n in ${SOURCES[@]} ; do + if [[ $1 != $n ]]; then + echo -e " $n = pkgs.haskell.lib.dontCheck (pkgs.haskell.lib.appendConfigureFlag (self.callPackage ../$n {}) \"--ghc-options=-Werror\");" >> $SHELLNIX + fi + done + echo -e " $1 = pkgs.haskell.lib.appendConfigureFlag (self.callPackage ./. {}) \"--ghc-options=-Werror\";" >> $SHELLNIX + echo -e " };" >> $SHELLNIX + echo -e " };" >> $SHELLNIX + echo -e "" >> $SHELLNIX + echo -e "in haskellPackages.$s.env" >> $SHELLNIX +} + +update-nix-files () { + for s in ${SOURCES[@]} ; do + cd "$s" && cabal2nix . > default.nix + write-package-shell-nix $s + done +} + +update-nix-files diff --git a/servant-blaze/default.nix b/servant-blaze/default.nix new file mode 100644 index 00000000..3c8d2ea4 --- /dev/null +++ b/servant-blaze/default.nix @@ -0,0 +1,10 @@ +{ mkDerivation, base, blaze-html, http-media, servant, stdenv }: +mkDerivation { + pname = "servant-blaze"; + version = "0.5"; + src = ./.; + buildDepends = [ base blaze-html http-media servant ]; + homepage = "http://haskell-servant.github.io/"; + description = "Blaze-html support for servant"; + license = stdenv.lib.licenses.bsd3; +} diff --git a/servant-blaze/shell.nix b/servant-blaze/shell.nix new file mode 100644 index 00000000..44a0f570 --- /dev/null +++ b/servant-blaze/shell.nix @@ -0,0 +1,18 @@ +let + pkgs = import {}; + + haskellPackages = pkgs.haskellPackages.override { + overrides = self: super: { + servant = pkgs.haskell.lib.dontCheck (pkgs.haskell.lib.appendConfigureFlag (self.callPackage ../servant {}) "--ghc-options=-Werror"); + servant-client = pkgs.haskell.lib.dontCheck (pkgs.haskell.lib.appendConfigureFlag (self.callPackage ../servant-client {}) "--ghc-options=-Werror"); + servant-docs = pkgs.haskell.lib.dontCheck (pkgs.haskell.lib.appendConfigureFlag (self.callPackage ../servant-docs {}) "--ghc-options=-Werror"); + servant-js = pkgs.haskell.lib.dontCheck (pkgs.haskell.lib.appendConfigureFlag (self.callPackage ../servant-js {}) "--ghc-options=-Werror"); + servant-server = pkgs.haskell.lib.dontCheck (pkgs.haskell.lib.appendConfigureFlag (self.callPackage ../servant-server {}) "--ghc-options=-Werror"); + servant-examples = pkgs.haskell.lib.dontCheck (pkgs.haskell.lib.appendConfigureFlag (self.callPackage ../servant-examples {}) "--ghc-options=-Werror"); + servant-lucid = pkgs.haskell.lib.dontCheck (pkgs.haskell.lib.appendConfigureFlag (self.callPackage ../servant-lucid {}) "--ghc-options=-Werror"); + servant-mock = pkgs.haskell.lib.dontCheck (pkgs.haskell.lib.appendConfigureFlag (self.callPackage ../servant-mock {}) "--ghc-options=-Werror"); + servant-blaze = pkgs.haskell.lib.appendConfigureFlag (self.callPackage ./. {}) "--ghc-options=-Werror"; + }; + }; + +in haskellPackages.servant-blaze.env diff --git a/servant-client/default.nix b/servant-client/default.nix index 5a6437c4..2a66c120 100644 --- a/servant-client/default.nix +++ b/servant-client/default.nix @@ -6,7 +6,7 @@ }: mkDerivation { pname = "servant-client"; - version = "0.4.0"; + version = "0.5"; src = ./.; buildDepends = [ aeson attoparsec base bytestring either exceptions http-client diff --git a/servant-client/shell.nix b/servant-client/shell.nix new file mode 100644 index 00000000..6862ab21 --- /dev/null +++ b/servant-client/shell.nix @@ -0,0 +1,18 @@ +let + pkgs = import {}; + + haskellPackages = pkgs.haskellPackages.override { + overrides = self: super: { + servant = pkgs.haskell.lib.dontCheck (pkgs.haskell.lib.appendConfigureFlag (self.callPackage ../servant {}) "--ghc-options=-Werror"); + servant-docs = pkgs.haskell.lib.dontCheck (pkgs.haskell.lib.appendConfigureFlag (self.callPackage ../servant-docs {}) "--ghc-options=-Werror"); + servant-js = pkgs.haskell.lib.dontCheck (pkgs.haskell.lib.appendConfigureFlag (self.callPackage ../servant-js {}) "--ghc-options=-Werror"); + servant-server = pkgs.haskell.lib.dontCheck (pkgs.haskell.lib.appendConfigureFlag (self.callPackage ../servant-server {}) "--ghc-options=-Werror"); + servant-examples = pkgs.haskell.lib.dontCheck (pkgs.haskell.lib.appendConfigureFlag (self.callPackage ../servant-examples {}) "--ghc-options=-Werror"); + servant-blaze = pkgs.haskell.lib.dontCheck (pkgs.haskell.lib.appendConfigureFlag (self.callPackage ../servant-blaze {}) "--ghc-options=-Werror"); + servant-lucid = pkgs.haskell.lib.dontCheck (pkgs.haskell.lib.appendConfigureFlag (self.callPackage ../servant-lucid {}) "--ghc-options=-Werror"); + servant-mock = pkgs.haskell.lib.dontCheck (pkgs.haskell.lib.appendConfigureFlag (self.callPackage ../servant-mock {}) "--ghc-options=-Werror"); + servant-client = pkgs.haskell.lib.appendConfigureFlag (self.callPackage ./. {}) "--ghc-options=-Werror"; + }; + }; + +in haskellPackages.servant-client.env diff --git a/servant-docs/default.nix b/servant-docs/default.nix index 7f61b37c..9f762739 100644 --- a/servant-docs/default.nix +++ b/servant-docs/default.nix @@ -1,18 +1,19 @@ -{ mkDerivation, aeson, base, bytestring, hashable, hspec -, http-media, lens, servant, stdenv, string-conversions, text -, unordered-containers +{ mkDerivation, aeson, base, bytestring, bytestring-conversion +, case-insensitive, hashable, hspec, http-media, http-types, lens +, servant, stdenv, string-conversions, text, unordered-containers }: mkDerivation { pname = "servant-docs"; - version = "0.4"; + version = "0.5"; src = ./.; isLibrary = true; isExecutable = true; buildDepends = [ - aeson base bytestring hashable http-media lens servant - string-conversions text unordered-containers + aeson base bytestring bytestring-conversion case-insensitive + hashable http-media http-types lens servant string-conversions text + unordered-containers ]; - testDepends = [ aeson base hspec servant string-conversions ]; + testDepends = [ aeson base hspec lens servant string-conversions ]; homepage = "http://haskell-servant.github.io/"; description = "generate API docs for your servant webservice"; license = stdenv.lib.licenses.bsd3; diff --git a/servant-docs/shell.nix b/servant-docs/shell.nix index e17a0f83..0bf6f8ca 100644 --- a/servant-docs/shell.nix +++ b/servant-docs/shell.nix @@ -1,9 +1,18 @@ -with (import {}).pkgs; -let modifiedHaskellPackages = haskellngPackages.override { - overrides = self: super: { - servant = self.callPackage ../servant {}; - servant-server = self.callPackage ./servant-server {}; - servant-docs = self.callPackage ./. {}; - }; +let + pkgs = import {}; + + haskellPackages = pkgs.haskellPackages.override { + overrides = self: super: { + servant = pkgs.haskell.lib.dontCheck (pkgs.haskell.lib.appendConfigureFlag (self.callPackage ../servant {}) "--ghc-options=-Werror"); + servant-client = pkgs.haskell.lib.dontCheck (pkgs.haskell.lib.appendConfigureFlag (self.callPackage ../servant-client {}) "--ghc-options=-Werror"); + servant-js = pkgs.haskell.lib.dontCheck (pkgs.haskell.lib.appendConfigureFlag (self.callPackage ../servant-js {}) "--ghc-options=-Werror"); + servant-server = pkgs.haskell.lib.dontCheck (pkgs.haskell.lib.appendConfigureFlag (self.callPackage ../servant-server {}) "--ghc-options=-Werror"); + servant-examples = pkgs.haskell.lib.dontCheck (pkgs.haskell.lib.appendConfigureFlag (self.callPackage ../servant-examples {}) "--ghc-options=-Werror"); + servant-blaze = pkgs.haskell.lib.dontCheck (pkgs.haskell.lib.appendConfigureFlag (self.callPackage ../servant-blaze {}) "--ghc-options=-Werror"); + servant-lucid = pkgs.haskell.lib.dontCheck (pkgs.haskell.lib.appendConfigureFlag (self.callPackage ../servant-lucid {}) "--ghc-options=-Werror"); + servant-mock = pkgs.haskell.lib.dontCheck (pkgs.haskell.lib.appendConfigureFlag (self.callPackage ../servant-mock {}) "--ghc-options=-Werror"); + servant-docs = pkgs.haskell.lib.appendConfigureFlag (self.callPackage ./. {}) "--ghc-options=-Werror"; }; -in modifiedHaskellPackages.servant-docs.env + }; + +in haskellPackages.servant-docs.env diff --git a/servant-examples/default.nix b/servant-examples/default.nix new file mode 100644 index 00000000..284279d9 --- /dev/null +++ b/servant-examples/default.nix @@ -0,0 +1,22 @@ +{ mkDerivation, aeson, base, bytestring, directory, either +, engine-io, engine-io-wai, http-types, js-jquery, lucid, mtl +, random, servant, servant-client, servant-docs, servant-js +, servant-lucid, servant-server, socket-io, stdenv, stm, text, time +, transformers, wai, wai-extra, warp +}: +mkDerivation { + pname = "servant-examples"; + version = "0.5"; + src = ./.; + isLibrary = false; + isExecutable = true; + buildDepends = [ + aeson base bytestring directory either engine-io engine-io-wai + http-types js-jquery lucid mtl random servant servant-client + servant-docs servant-js servant-lucid servant-server socket-io stm + text time transformers wai wai-extra warp + ]; + homepage = "http://haskell-servant.github.io/"; + description = "Example programs for servant"; + license = stdenv.lib.licenses.bsd3; +} diff --git a/servant-examples/shell.nix b/servant-examples/shell.nix new file mode 100644 index 00000000..0fae2886 --- /dev/null +++ b/servant-examples/shell.nix @@ -0,0 +1,18 @@ +let + pkgs = import {}; + + haskellPackages = pkgs.haskellPackages.override { + overrides = self: super: { + servant = pkgs.haskell.lib.dontCheck (pkgs.haskell.lib.appendConfigureFlag (self.callPackage ../servant {}) "--ghc-options=-Werror"); + servant-client = pkgs.haskell.lib.dontCheck (pkgs.haskell.lib.appendConfigureFlag (self.callPackage ../servant-client {}) "--ghc-options=-Werror"); + servant-docs = pkgs.haskell.lib.dontCheck (pkgs.haskell.lib.appendConfigureFlag (self.callPackage ../servant-docs {}) "--ghc-options=-Werror"); + servant-js = pkgs.haskell.lib.dontCheck (pkgs.haskell.lib.appendConfigureFlag (self.callPackage ../servant-js {}) "--ghc-options=-Werror"); + servant-server = pkgs.haskell.lib.dontCheck (pkgs.haskell.lib.appendConfigureFlag (self.callPackage ../servant-server {}) "--ghc-options=-Werror"); + servant-blaze = pkgs.haskell.lib.dontCheck (pkgs.haskell.lib.appendConfigureFlag (self.callPackage ../servant-blaze {}) "--ghc-options=-Werror"); + servant-lucid = pkgs.haskell.lib.dontCheck (pkgs.haskell.lib.appendConfigureFlag (self.callPackage ../servant-lucid {}) "--ghc-options=-Werror"); + servant-mock = pkgs.haskell.lib.dontCheck (pkgs.haskell.lib.appendConfigureFlag (self.callPackage ../servant-mock {}) "--ghc-options=-Werror"); + servant-examples = pkgs.haskell.lib.appendConfigureFlag (self.callPackage ./. {}) "--ghc-options=-Werror"; + }; + }; + +in haskellPackages.servant-examples.env diff --git a/servant-js/default.nix b/servant-js/default.nix index f84d977e..09bb777b 100644 --- a/servant-js/default.nix +++ b/servant-js/default.nix @@ -4,7 +4,7 @@ }: mkDerivation { pname = "servant-js"; - version = "0.4.0"; + version = "0.5"; src = ./.; isLibrary = true; isExecutable = true; diff --git a/servant-js/shell.nix b/servant-js/shell.nix new file mode 100644 index 00000000..9f4c888a --- /dev/null +++ b/servant-js/shell.nix @@ -0,0 +1,18 @@ +let + pkgs = import {}; + + haskellPackages = pkgs.haskellPackages.override { + overrides = self: super: { + servant = pkgs.haskell.lib.dontCheck (pkgs.haskell.lib.appendConfigureFlag (self.callPackage ../servant {}) "--ghc-options=-Werror"); + servant-client = pkgs.haskell.lib.dontCheck (pkgs.haskell.lib.appendConfigureFlag (self.callPackage ../servant-client {}) "--ghc-options=-Werror"); + servant-docs = pkgs.haskell.lib.dontCheck (pkgs.haskell.lib.appendConfigureFlag (self.callPackage ../servant-docs {}) "--ghc-options=-Werror"); + servant-server = pkgs.haskell.lib.dontCheck (pkgs.haskell.lib.appendConfigureFlag (self.callPackage ../servant-server {}) "--ghc-options=-Werror"); + servant-examples = pkgs.haskell.lib.dontCheck (pkgs.haskell.lib.appendConfigureFlag (self.callPackage ../servant-examples {}) "--ghc-options=-Werror"); + servant-blaze = pkgs.haskell.lib.dontCheck (pkgs.haskell.lib.appendConfigureFlag (self.callPackage ../servant-blaze {}) "--ghc-options=-Werror"); + servant-lucid = pkgs.haskell.lib.dontCheck (pkgs.haskell.lib.appendConfigureFlag (self.callPackage ../servant-lucid {}) "--ghc-options=-Werror"); + servant-mock = pkgs.haskell.lib.dontCheck (pkgs.haskell.lib.appendConfigureFlag (self.callPackage ../servant-mock {}) "--ghc-options=-Werror"); + servant-js = pkgs.haskell.lib.appendConfigureFlag (self.callPackage ./. {}) "--ghc-options=-Werror"; + }; + }; + +in haskellPackages.servant-js.env diff --git a/servant-lucid/default.nix b/servant-lucid/default.nix new file mode 100644 index 00000000..e033c71c --- /dev/null +++ b/servant-lucid/default.nix @@ -0,0 +1,10 @@ +{ mkDerivation, base, http-media, lucid, servant, stdenv }: +mkDerivation { + pname = "servant-lucid"; + version = "0.5"; + src = ./.; + buildDepends = [ base http-media lucid servant ]; + homepage = "http://haskell-servant.github.io/"; + description = "Servant support for lucid"; + license = stdenv.lib.licenses.bsd3; +} diff --git a/servant-lucid/shell.nix b/servant-lucid/shell.nix new file mode 100644 index 00000000..656531cd --- /dev/null +++ b/servant-lucid/shell.nix @@ -0,0 +1,18 @@ +let + pkgs = import {}; + + haskellPackages = pkgs.haskellPackages.override { + overrides = self: super: { + servant = pkgs.haskell.lib.dontCheck (pkgs.haskell.lib.appendConfigureFlag (self.callPackage ../servant {}) "--ghc-options=-Werror"); + servant-client = pkgs.haskell.lib.dontCheck (pkgs.haskell.lib.appendConfigureFlag (self.callPackage ../servant-client {}) "--ghc-options=-Werror"); + servant-docs = pkgs.haskell.lib.dontCheck (pkgs.haskell.lib.appendConfigureFlag (self.callPackage ../servant-docs {}) "--ghc-options=-Werror"); + servant-js = pkgs.haskell.lib.dontCheck (pkgs.haskell.lib.appendConfigureFlag (self.callPackage ../servant-js {}) "--ghc-options=-Werror"); + servant-server = pkgs.haskell.lib.dontCheck (pkgs.haskell.lib.appendConfigureFlag (self.callPackage ../servant-server {}) "--ghc-options=-Werror"); + servant-examples = pkgs.haskell.lib.dontCheck (pkgs.haskell.lib.appendConfigureFlag (self.callPackage ../servant-examples {}) "--ghc-options=-Werror"); + servant-blaze = pkgs.haskell.lib.dontCheck (pkgs.haskell.lib.appendConfigureFlag (self.callPackage ../servant-blaze {}) "--ghc-options=-Werror"); + servant-mock = pkgs.haskell.lib.dontCheck (pkgs.haskell.lib.appendConfigureFlag (self.callPackage ../servant-mock {}) "--ghc-options=-Werror"); + servant-lucid = pkgs.haskell.lib.appendConfigureFlag (self.callPackage ./. {}) "--ghc-options=-Werror"; + }; + }; + +in haskellPackages.servant-lucid.env diff --git a/servant-mock/default.nix b/servant-mock/default.nix new file mode 100644 index 00000000..670e066e --- /dev/null +++ b/servant-mock/default.nix @@ -0,0 +1,17 @@ +{ mkDerivation, aeson, base, bytestring, http-types, QuickCheck +, servant, servant-server, stdenv, transformers, wai, warp +}: +mkDerivation { + pname = "servant-mock"; + version = "0.5"; + src = ./.; + isLibrary = true; + isExecutable = true; + buildDepends = [ + aeson base bytestring http-types QuickCheck servant servant-server + transformers wai warp + ]; + homepage = "http://github.com/haskell-servant/servant"; + description = "Derive a mock server for free from your servant API types"; + license = stdenv.lib.licenses.bsd3; +} diff --git a/servant-mock/shell.nix b/servant-mock/shell.nix new file mode 100644 index 00000000..cd9721d7 --- /dev/null +++ b/servant-mock/shell.nix @@ -0,0 +1,18 @@ +let + pkgs = import {}; + + haskellPackages = pkgs.haskellPackages.override { + overrides = self: super: { + servant = pkgs.haskell.lib.dontCheck (pkgs.haskell.lib.appendConfigureFlag (self.callPackage ../servant {}) "--ghc-options=-Werror"); + servant-client = pkgs.haskell.lib.dontCheck (pkgs.haskell.lib.appendConfigureFlag (self.callPackage ../servant-client {}) "--ghc-options=-Werror"); + servant-docs = pkgs.haskell.lib.dontCheck (pkgs.haskell.lib.appendConfigureFlag (self.callPackage ../servant-docs {}) "--ghc-options=-Werror"); + servant-js = pkgs.haskell.lib.dontCheck (pkgs.haskell.lib.appendConfigureFlag (self.callPackage ../servant-js {}) "--ghc-options=-Werror"); + servant-server = pkgs.haskell.lib.dontCheck (pkgs.haskell.lib.appendConfigureFlag (self.callPackage ../servant-server {}) "--ghc-options=-Werror"); + servant-examples = pkgs.haskell.lib.dontCheck (pkgs.haskell.lib.appendConfigureFlag (self.callPackage ../servant-examples {}) "--ghc-options=-Werror"); + servant-blaze = pkgs.haskell.lib.dontCheck (pkgs.haskell.lib.appendConfigureFlag (self.callPackage ../servant-blaze {}) "--ghc-options=-Werror"); + servant-lucid = pkgs.haskell.lib.dontCheck (pkgs.haskell.lib.appendConfigureFlag (self.callPackage ../servant-lucid {}) "--ghc-options=-Werror"); + servant-mock = pkgs.haskell.lib.appendConfigureFlag (self.callPackage ./. {}) "--ghc-options=-Werror"; + }; + }; + +in haskellPackages.servant-mock.env diff --git a/servant-server/default.nix b/servant-server/default.nix index 6fd6fad7..2254caab 100644 --- a/servant-server/default.nix +++ b/servant-server/default.nix @@ -1,25 +1,27 @@ { mkDerivation, aeson, attoparsec, base, bytestring -, bytestring-conversion, directory, doctest, either, exceptions -, filemanip, hspec, hspec-wai, http-types, mmorph, mtl, network -, network-uri, parsec, QuickCheck, safe, servant, split, stdenv -, string-conversions, system-filepath, temporary, text -, transformers, wai, wai-app-static, wai-extra, warp +, bytestring-conversion, containers, directory, doctest, either +, exceptions, filemanip, filepath, hspec, hspec-wai, http-types +, mmorph, mtl, network, network-uri, parsec, QuickCheck, safe +, servant, split, stdenv, string-conversions, system-filepath +, temporary, text, transformers, wai, wai-app-static, wai-extra +, warp }: mkDerivation { pname = "servant-server"; - version = "0.4.0"; + version = "0.5"; src = ./.; isLibrary = true; isExecutable = true; buildDepends = [ - aeson attoparsec base bytestring either http-types mmorph mtl - network-uri safe servant split string-conversions system-filepath - text transformers wai wai-app-static warp + aeson attoparsec base bytestring containers either filepath + http-types mmorph mtl network network-uri safe servant split + string-conversions system-filepath text transformers wai + wai-app-static warp ]; testDepends = [ aeson base bytestring bytestring-conversion directory doctest - either exceptions filemanip hspec hspec-wai http-types mtl network - parsec QuickCheck servant string-conversions temporary text + either exceptions filemanip filepath hspec hspec-wai http-types mtl + network parsec QuickCheck servant string-conversions temporary text transformers wai wai-extra warp ]; homepage = "http://haskell-servant.github.io/"; diff --git a/servant-server/shell.nix b/servant-server/shell.nix new file mode 100644 index 00000000..8fb19d5a --- /dev/null +++ b/servant-server/shell.nix @@ -0,0 +1,18 @@ +let + pkgs = import {}; + + haskellPackages = pkgs.haskellPackages.override { + overrides = self: super: { + servant = pkgs.haskell.lib.dontCheck (pkgs.haskell.lib.appendConfigureFlag (self.callPackage ../servant {}) "--ghc-options=-Werror"); + servant-client = pkgs.haskell.lib.dontCheck (pkgs.haskell.lib.appendConfigureFlag (self.callPackage ../servant-client {}) "--ghc-options=-Werror"); + servant-docs = pkgs.haskell.lib.dontCheck (pkgs.haskell.lib.appendConfigureFlag (self.callPackage ../servant-docs {}) "--ghc-options=-Werror"); + servant-js = pkgs.haskell.lib.dontCheck (pkgs.haskell.lib.appendConfigureFlag (self.callPackage ../servant-js {}) "--ghc-options=-Werror"); + servant-examples = pkgs.haskell.lib.dontCheck (pkgs.haskell.lib.appendConfigureFlag (self.callPackage ../servant-examples {}) "--ghc-options=-Werror"); + servant-blaze = pkgs.haskell.lib.dontCheck (pkgs.haskell.lib.appendConfigureFlag (self.callPackage ../servant-blaze {}) "--ghc-options=-Werror"); + servant-lucid = pkgs.haskell.lib.dontCheck (pkgs.haskell.lib.appendConfigureFlag (self.callPackage ../servant-lucid {}) "--ghc-options=-Werror"); + servant-mock = pkgs.haskell.lib.dontCheck (pkgs.haskell.lib.appendConfigureFlag (self.callPackage ../servant-mock {}) "--ghc-options=-Werror"); + servant-server = pkgs.haskell.lib.appendConfigureFlag (self.callPackage ./. {}) "--ghc-options=-Werror"; + }; + }; + +in haskellPackages.servant-server.env diff --git a/servant/default.nix b/servant/default.nix index 5970a17e..0bf96999 100644 --- a/servant/default.nix +++ b/servant/default.nix @@ -1,20 +1,22 @@ { mkDerivation, aeson, attoparsec, base, bytestring -, bytestring-conversion, case-insensitive, doctest, filemanip -, hspec, http-media, http-types, network-uri, parsec, QuickCheck -, quickcheck-instances, stdenv, string-conversions, text, url +, bytestring-conversion, case-insensitive, directory, doctest +, filemanip, filepath, hspec, http-media, http-types, network-uri +, parsec, QuickCheck, quickcheck-instances, stdenv +, string-conversions, text, url, vault }: mkDerivation { pname = "servant"; - version = "0.4.0"; + version = "0.5"; src = ./.; buildDepends = [ aeson attoparsec base bytestring bytestring-conversion case-insensitive http-media http-types network-uri - string-conversions text + string-conversions text vault ]; testDepends = [ - aeson attoparsec base bytestring doctest filemanip hspec parsec - QuickCheck quickcheck-instances string-conversions text url + aeson attoparsec base bytestring directory doctest filemanip + filepath hspec parsec QuickCheck quickcheck-instances + string-conversions text url ]; homepage = "http://haskell-servant.github.io/"; description = "A family of combinators for defining webservices APIs"; diff --git a/servant/shell.nix b/servant/shell.nix index 1dc98d67..82d3938f 100644 --- a/servant/shell.nix +++ b/servant/shell.nix @@ -1,2 +1,18 @@ -with (import {}).pkgs; -(haskellngPackages.callPackage ./. {}).env +let + pkgs = import {}; + + haskellPackages = pkgs.haskellPackages.override { + overrides = self: super: { + servant-client = pkgs.haskell.lib.dontCheck (pkgs.haskell.lib.appendConfigureFlag (self.callPackage ../servant-client {}) "--ghc-options=-Werror"); + servant-docs = pkgs.haskell.lib.dontCheck (pkgs.haskell.lib.appendConfigureFlag (self.callPackage ../servant-docs {}) "--ghc-options=-Werror"); + servant-js = pkgs.haskell.lib.dontCheck (pkgs.haskell.lib.appendConfigureFlag (self.callPackage ../servant-js {}) "--ghc-options=-Werror"); + servant-server = pkgs.haskell.lib.dontCheck (pkgs.haskell.lib.appendConfigureFlag (self.callPackage ../servant-server {}) "--ghc-options=-Werror"); + servant-examples = pkgs.haskell.lib.dontCheck (pkgs.haskell.lib.appendConfigureFlag (self.callPackage ../servant-examples {}) "--ghc-options=-Werror"); + servant-blaze = pkgs.haskell.lib.dontCheck (pkgs.haskell.lib.appendConfigureFlag (self.callPackage ../servant-blaze {}) "--ghc-options=-Werror"); + servant-lucid = pkgs.haskell.lib.dontCheck (pkgs.haskell.lib.appendConfigureFlag (self.callPackage ../servant-lucid {}) "--ghc-options=-Werror"); + servant-mock = pkgs.haskell.lib.dontCheck (pkgs.haskell.lib.appendConfigureFlag (self.callPackage ../servant-mock {}) "--ghc-options=-Werror"); + servant = pkgs.haskell.lib.appendConfigureFlag (self.callPackage ./. {}) "--ghc-options=-Werror"; + }; + }; + +in haskellPackages.servant.env