...
 
Commits (3)
......@@ -22,3 +22,4 @@ bookme.cabal
/TAGS
/deps.png
/devenv.sh
/result
......@@ -6,7 +6,7 @@ before_script:
build:
script:
- stack build
- stack test
cache:
paths:
......
......@@ -13,11 +13,11 @@ ip-from-header: "_env:IP_FROM_HEADER:false"
provider-name: "_env:BOOKME_PROVIDER_NAME"
provider-avatar: "_env:BOOKME_PROVIDER_AVATAR"
time-zone: _env:BOOKME_TIME_ZONE:America/New_York
appointment-lengths-minutes: [15, 20, 25]
appointment-lengths-minutes: [10, 15, 20, 25]
locations:
- - "#office"
- At LIU Brooklyn (usually H700)
- - ""
- - "#hours"
- Online via Google Hangout or phone
calendar-credentials:
......
{ nixpkgs ? import <nixpkgs> {}
}:
with nixpkgs;
let
stackageVersion = "lts-1110";
stackageSrc = pkgs.fetchgit {
url = "https://github.com/typeable/nixpkgs-stackage.git";
rev = "7c94ec65e12850e7dd5282e83a6da91f88cb8857";
sha256 = "1ihsbgb9agg1f5q7mk3ycja6njbrg1dqlxniav47kyr9cm5ng0kn";
};
gogolSrc = pkgs.fetchgit {
url = "https://github.com/brendanhay/gogol.git";
rev = "344c9f781560e1ed8395b17e370ba1b085f2edc2";
sha256 = "0f48mh7f2ifk3b7rjwgn9cwmi6845xv9zvs07khycbk70959pk1n";
};
stackageOverlay = import stackageSrc;
nixpkgs' = import pkgs.path { overlays = [stackageOverlay]; };
haskell = nixpkgs'.pkgs.haskell;
mkNix = name: loc: pkgs.runCommand name {} ''
${pkgs.cabal2nix}/bin/cabal2nix ${loc} >$out
'';
gogolCoreNix = mkNix "gogol-core.nix" "${gogolSrc}/core";
gogolNix = mkNix "gogol.nix" "${gogolSrc}/gogol";
gogolCalNix = mkNix "gogol-cal.nix" "${gogolSrc}/gogol-apps-calendar";
bookmeNix = mkNix "bookme.nix" ./.;
hpkgs = haskell.packages.stackage.${stackageVersion}.override {
overrides = self: super: {
gogol-core = self.callPackage gogolCoreNix {};
gogol = self.callPackage gogolNix {};
gogol-apps-calendar = self.callPackage gogolCalNix {};
alex = haskell.lib.dontCheck super.alex;
bookme = self.callPackage bookmeNix {};
# mkDerivation = args: super.mkDerivation (args // {
# enableLibraryProfiling = false;
# doHoogle = false;
# doHaddock = false;
# });
};
};
in
haskell.lib.justStaticExecutables hpkgs.bookme
{ nixpkgs ? import <nixpkgs> {}
}:
(import ./default.nix { inherit nixpkgs; }).env
......@@ -20,3 +20,7 @@ h1 {
#message {
margin-bottom: 10px;
}
footer {
margin-bottom: 3ex;
}
......@@ -14,13 +14,4 @@ spec =
it "loads the index and checks it looks right" $ do
get HomeR
statusIs 200
htmlAnyContain "h1" "a modern framework for blazing fast websites"
request $ do
setMethod "POST"
setUrl HomeR
addToken
fileByLabelExact "Choose a file" "test/Spec.hs" "text/plain" -- talk about self-reference
byLabelExact "What's on the file?" "Some Content"
-- more debugging printBody
htmlAllContain ".upload-response" "text/plain"
htmlAllContain ".upload-response" "Some Content"
htmlAnyContain "h1" "Find time to meet"