1
1
mirror of https://github.com/aelve/guide.git synced 2024-12-25 05:43:32 +03:00

Merge pull request #212 from aelve/sectore/custom-nix-file

Use custom `Nix` file
This commit is contained in:
Jens Krause 2017-11-01 21:25:36 +01:00 committed by GitHub
commit 76f69a1d28
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 11 additions and 6 deletions

8
shell.nix Normal file
View File

@ -0,0 +1,8 @@
with import <nixpkgs> { };
haskell.lib.buildStackProject {
name = "guide";
inherit ghc;
buildInputs = [ git ncurses zlib ];
LANG = "en_US.UTF-8";
}

View File

@ -53,7 +53,6 @@ import Data.Serialize.Get as Cereal
-- IO
import System.IO
import qualified SlaveThread as Slave
import GHC.IO.Encoding (setLocaleEncoding, utf8)
-- Catching signals
import System.Posix.Signals
-- Watching the templates directory
@ -137,8 +136,6 @@ lucidWithConfig x = do
-- | Start the site.
main :: IO ()
main = do
-- force to use UTF-8
setLocaleEncoding utf8
config <- readConfig
mainWith config

View File

@ -11,6 +11,9 @@ packages:
commit: 26e5f8c7f62ebce66ef19e5bd573af21c16fe2b1
extra-dep: true
nix:
shell-file: shell.nix
extra-deps:
- text-all-0.4.1.0
- cmark-sections-0.3.0

View File

@ -5,7 +5,6 @@
module Main (main) where
import BasePrelude
import GHC.IO.Encoding (setLocaleEncoding, utf8)
-- Testing
import Test.Hspec
@ -17,8 +16,6 @@ import qualified MergeSpec
main :: IO ()
main = do
-- force to use UTF-8
setLocaleEncoding utf8
hspec $ do
MarkdownSpec.tests
MergeSpec.tests