2Y2QZFVFSKXEFEGYJB5A7GI735ONWPCF7DVTIY5T73AUEVTZTBBQC
HE3JTXO37O4MOMWPZ4BRBHP53KBPZDG3PCSUCVNOKIS7IY26OCIAC
AXKKXBWN4EMUOLV43WN52JSKJPBV7TLSGLNJW5EZXHSJNKCYUWOQC
OBFPJS2GHO2PEHBHGEHKIUOUAFIQHPIZXEVD2YIE3ZIE2PVMH5VAC
4IQVQL4TS35GL2GYZJG254TKJLL5EHMRSFT77Z4VTRZIG2TMBM3QC
Z3M53KTLZMPOISMHE25SZJSWX5TA37IV33IRE7KNRAD3PKEAEJXQC
TCOAKCGGHOIRJCTZYEZQ3K6KCGL2LGAYGYFRGSPCHBTJJY2V6AXAC
ADMKQQGCGVSHHIMVQ4XFRDCG544SBJCYALSKZV45CQQBZ4ACUH2AC
WZUHEZSBRKHQMNWDKVG4X6DDIQEAXTGI6IGAJ5ERPRQ3W2KUMX4QC
64VI73NPSFNWTL6UXM6YHRFLNJZ3NUJ2R3CL53MO2HSZWFGBIRTQC
64C6AWH66FDKU6UE6Z6JPX2J2GBM2JOPTH2GL6LHKAIUBGNGDZ5AC
# This file was auto-generated by cabal2nix. Please do NOT edit manually!
{ haskellPackages ? (import <nixpkgs> {}).haskellPackages }:
#{ cabal, aeson, bifunctors, classyPrelude
#, configurator, either, errors, groups, hourglass, hspec, lens
#, MonadCatchIOTransformers, mtl, networkBitcoin
#, optparseApplicative, safe, snapCore, snapServer, sqliteSimple
#, text, time, transformers
#}:
with haskellPackages; cabal.mkDerivation (self: {
pname = "quixotic";
version = "0.1";
src = "./.";
isLibrary = true;
isExecutable = true;
#buildTools = [ cabalInstall ];
buildDepends = [
aeson bifunctors classyPrelude configurator either
errors groups hourglass lens MonadCatchIOTransformers mtl
networkBitcoin optparseApplicative safe snapCore snapServer
sqliteSimple text time transformers
];
testDepends = [ aeson hspec text time ];
meta = {
description = "The Quixotic Collaboration Platform";
license = self.stdenv.lib.licenses.unfree;
platforms = self.ghc.meta.platforms;
};
})
QConfig <$> C.require cfg "port" <*> C.require cfg "db"
parseQConfig cfg
parseQConfig :: CT.Config -> IO QConfig
parseQConfig cfg =
QConfig <$> C.lookupDefault "localhost" cfg "hostname"
<*> C.lookupDefault 8443 cfg "port"
<*> (fmap fpFromText $ C.require cfg "sslCert")
<*> (fmap fpFromText $ C.require cfg "sslKey")
<*> C.require cfg "db"
baseSnapConfig :: MonadSnap m => QConfig -> SC.Config m a -> SC.Config m a
baseSnapConfig cfg =
SC.setHostname (hostname cfg) .
SC.setSSLPort (port cfg) .
SC.setSSLCert (fpToString $ sslCert cfg) .
SC.setSSLKey (fpToString $ sslKey cfg)
snapConfig :: QConfig -> IO (SC.Config Snap ())
snapConfig cfg = SC.commandLineConfig $ baseSnapConfig cfg emptyConfig