diff --git a/ci-builds.nix b/ci-builds.nix index 54d6f637a..e8eb0f527 100644 --- a/ci-builds.nix +++ b/ci-builds.nix @@ -25,5 +25,4 @@ in with pkgs; [ third_party.git third_party.guile third_party.lisp # will build all third-party libraries - # web.tazblog # TODO(tazjin): Happstack build failure in nixos-unstable ] diff --git a/web/tazblog/blog/Main.hs b/web/tazblog/blog/Main.hs deleted file mode 100644 index 6074f96b7..000000000 --- a/web/tazblog/blog/Main.hs +++ /dev/null @@ -1,24 +0,0 @@ --- | Main module for the blog's web server -module Main where - -import Control.Applicative ((<$>), (<*>)) -import Server (runBlog) -import System.Environment (getEnv) - -data MainOptions - = MainOptions - { blogPort :: Int, - resourceDir :: String - } - -readOpts :: IO MainOptions -readOpts = - MainOptions - <$> (fmap read $ getEnv "PORT") - <*> getEnv "RESOURCE_DIR" - -main :: IO () -main = do - opts <- readOpts - putStrLn ("tazblog starting on port " ++ (show $ blogPort opts)) - runBlog (blogPort opts) (resourceDir opts) diff --git a/web/tazblog/default.nix b/web/tazblog/default.nix deleted file mode 100644 index eecadff6b..000000000 --- a/web/tazblog/default.nix +++ /dev/null @@ -1,18 +0,0 @@ -# Build configuration for the blog using plain Nix. -# -# tazblog.nix was generated using cabal2nix. - -{ pkgs, ... }: - -let - inherit (pkgs.third_party) writeShellScriptBin haskell; - tazblog = haskell.packages.ghc865.callPackage ./tazblog.nix {}; - wrapper = writeShellScriptBin "tazblog" '' - export PORT=8000 - export RESOURCE_DIR=${./static} - exec ${tazblog}/bin/tazblog - ''; -in wrapper.overrideAttrs(_: { - allowSubstitutes = true; - meta.enableCI = true; -}) diff --git a/web/tazblog/shell.nix b/web/tazblog/shell.nix deleted file mode 100644 index ebb891a87..000000000 --- a/web/tazblog/shell.nix +++ /dev/null @@ -1,11 +0,0 @@ -{ pkgs ? (import ../../default.nix {}).third_party.nixpkgs }: - -let tazblog = import ./tazblog.nix; - depNames = with builtins; filter ( - p: hasAttr p pkgs.haskellPackages - ) (attrNames (functionArgs tazblog)); - ghc = pkgs.ghc.withPackages(p: map (x: p."${x}") depNames); -in pkgs.stdenv.mkDerivation { - name = "shell"; - buildInputs = [ ghc pkgs.hlint ]; -} diff --git a/web/tazblog/src/Blog.hs b/web/tazblog/src/Blog.hs deleted file mode 100644 index 0a53b5f2f..000000000 --- a/web/tazblog/src/Blog.hs +++ /dev/null @@ -1,141 +0,0 @@ -{-# LANGUAGE DeriveDataTypeable #-} -{-# LANGUAGE FlexibleContexts #-} -{-# LANGUAGE GeneralizedNewtypeDeriving #-} -{-# LANGUAGE MultiParamTypeClasses #-} -{-# LANGUAGE OverloadedStrings #-} -{-# LANGUAGE QuasiQuotes #-} -{-# LANGUAGE RecordWildCards #-} -{-# LANGUAGE ScopedTypeVariables #-} -{-# LANGUAGE TemplateHaskell #-} -{-# LANGUAGE TypeFamilies #-} - -module Blog where - -import BlogStore -import Data.Text (Text, pack) -import qualified Data.Text as T -import Data.Text.Lazy (fromStrict) -import Data.Time -import Text.Blaze.Html (preEscapedToHtml) -import Text.Hamlet -import Text.Markdown - -blogTitle :: Text = "tazjin's blog" - -repoURL :: Text = "https://bitbucket.org/tazjin/tazblog-haskell" - -mailTo :: Text = "mailto:mail@tazj.in" - -twitter :: Text = "https://twitter.com/tazjin" - -replace :: Eq a => a -> a -> [a] -> [a] -replace x y = map (\z -> if z == x then y else z) - --- |After this date all entries are Markdown -markdownCutoff :: Day -markdownCutoff = fromGregorian 2013 04 28 - -blogTemplate :: Text -> Html -> Html -blogTemplate t_append body = - [shamlet| -$doctype 5 -
- - - - - -