Skip to content

Instantly share code, notes, and snippets.

{-# LANGUAGE DataKinds, TypeOperators #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
module Kraken.Daemon where
import Control.Monad.Trans.Either
import Data.Proxy
import Network.Wai
import Network.Wai.Handler.Warp.Run
@soenkehahn
soenkehahn / gist:b1beb4f32d54cc177f9c
Last active August 29, 2015 14:08
nix: use specific revision of servant
let
filterHaskellSource = builtins.filterSource (path: type:
type != "unknown" &&
baseNameOf path != ".git" &&
baseNameOf path != "result" &&
baseNameOf path != "dist");
in
{ pkgs ? import <nixpkgs> { }
, src ? filterHaskellSource ./.
}:
#!/usr/bin/env bash
cabal configure && cabal build && cabal haddock --hyperlink-source \
--html-location='/package/$pkg-$version/docs' \
--contents-location='/package/$pkg'
S=$?
if [ "${S}" -eq "0" ]; then
cd "dist/doc/html"
DDIR="${1}-${2}-docs"
cp -r "${1}" "${DDIR}" && tar -c -v -z --format=ustar -f "${DDIR}.tar.gz" "${DDIR}"
CS=$?