From 7b8ff2e5137f95938a4ab074f125130ae2233c41 Mon Sep 17 00:00:00 2001 From: "Julian K. Arni" Date: Mon, 2 Mar 2015 15:02:05 +0100 Subject: [PATCH] Add default.nix and make travis use 0.2 branches. --- .travis.yml | 2 +- default.nix | 21 +++++++++++++++++++++ servant-docs.cabal | 2 +- 3 files changed, 23 insertions(+), 2 deletions(-) create mode 100644 default.nix diff --git a/.travis.yml b/.travis.yml index 41be6fa3..eb10ee8c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,7 +4,7 @@ ghc: - 7.8 before_install: - - git clone https://github.com/haskell-servant/servant.git + - git clone -b servant-0.2 https://github.com/haskell-servant/servant.git - cabal sandbox init - cabal sandbox add-source servant/ diff --git a/default.nix b/default.nix new file mode 100644 index 00000000..b66be7e5 --- /dev/null +++ b/default.nix @@ -0,0 +1,21 @@ +{ pkgs ? import { config.allowUnfree = true; } +, src ? builtins.filterSource (path: type: + type != "unknown" && + baseNameOf path != ".git" && + baseNameOf path != "result" && + baseNameOf path != "dist") ./. +}: +let + servant02 = pkgs.fetchgit { + url = https://github.com/haskell-servant/servant.git; + rev = "refs/heads/servant-0.2"; + sha256 = "0mcn9d8hnijws1p8y6h3r0298f1x8mya2nshyi46mprrj2kn8wmm"; + }; +in +pkgs.haskellPackages.buildLocalCabalWithArgs { + name = "servant-client"; + inherit src; + args = { + servant = import servant02 {}; + }; +} diff --git a/servant-docs.cabal b/servant-docs.cabal index 52c06b5b..c820db6c 100644 --- a/servant-docs.cabal +++ b/servant-docs.cabal @@ -33,7 +33,7 @@ library , bytestring , hashable , lens - , servant >= 0.2.1 + , servant >= 0.2.1 && < 0.3 , string-conversions , system-filepath , text