Compare commits

..

No commits in common. "2eb5304977345ee3350b47d3fe47d68176d050e6" and "f50311e126fd02ea03530401397d15b5871a57f6" have entirely different histories.

5 changed files with 56 additions and 82 deletions

View File

@ -1,27 +1,27 @@
{-# LANGUAGE DataKinds #-} {-# Language DataKinds #-}
{-# LANGUAGE DeriveGeneric #-} {-# Language TypeFamilies #-}
{-# LANGUAGE FlexibleInstances #-} {-# Language TypeOperators #-}
{-# LANGUAGE MultiParamTypeClasses #-} {-# Language NoImplicitPrelude #-}
{-# LANGUAGE NoImplicitPrelude #-} {-# Language MultiParamTypeClasses #-}
{-# LANGUAGE OverloadedStrings #-} {-# Language OverloadedStrings #-}
{-# LANGUAGE QuasiQuotes #-} {-# Language TemplateHaskell #-}
{-# LANGUAGE RecordWildCards #-} {-# Language QuasiQuotes #-}
{-# LANGUAGE TemplateHaskell #-} {-# Language RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-} {-# Language DeriveGeneric #-}
{-# LANGUAGE TypeOperators #-} {-# Language FlexibleInstances #-}
module API (API, handler) where module API (API, handler) where
import Servant import Servant
import Servant.HTML.Lucid (HTML) import Servant.HTML.Lucid (HTML)
import Types import Types
import View import View
import qualified API.Books as Books import qualified API.Users as Users
import qualified API.Catalogue as Catalogue import qualified API.Channels as Channels
import qualified API.Channels as Channels import qualified API.Books as Books
import qualified API.Users as Users import qualified API.Catalogue as Catalogue
data Index = Index data Index = Index

View File

@ -10,8 +10,8 @@ let
miso = nixpkgs.fetchFromGitHub { miso = nixpkgs.fetchFromGitHub {
owner = "dmjio"; owner = "dmjio";
repo = "miso"; repo = "miso";
rev = "630e823dd40a434b73124e12b229a79d9fefb01d"; rev = "a9c4f0a3a6e7d87f9432dc6cf4b1d0c052bf7ef1";
sha256 = "046gdp3ah2lsipfcy89rh20mn08xbhcgrj549v8zzy69j33xjm2l"; sha256 = "1yq5y4vffslm6abnfnggp5m3k6vla6mzcwmhmm23l8yizsvdkwv2";
}; };
miso-jsaddle = super: if haskellPackages.ghc.isGhcjs or false then (super.callPackage (miso + "/miso-ghcjs.nix") {}) else (super.callPackage (miso + "/miso-ghc-jsaddle.nix") {}); miso-jsaddle = super: if haskellPackages.ghc.isGhcjs or false then (super.callPackage (miso + "/miso-ghcjs.nix") {}) else (super.callPackage (miso + "/miso-ghc-jsaddle.nix") {});
@ -31,37 +31,37 @@ in
jsaddle-warp = nixpkgs.haskell.lib.dontCheck (super.callPackage (jsaddle + "/jsaddle-warp") {}); jsaddle-warp = nixpkgs.haskell.lib.dontCheck (super.callPackage (jsaddle + "/jsaddle-warp") {});
jsaddle = super.callPackage (jsaddle + "/jsaddle") {}; jsaddle = super.callPackage (jsaddle + "/jsaddle") {};
miso = miso-jsaddle super; miso = miso-jsaddle super;
# doctest = null; # Not compilable with ghcjs doctest = null; # Not compilable with ghcjs
# comonad = dontCheck super.comonad; comonad = dontCheck super.comonad;
# Glob = dontCheck super.Glob; Glob = dontCheck super.Glob;
# SHA = dontCheck super.SHA; SHA = dontCheck super.SHA;
# iproute = dontCheck super.iproute; iproute = dontCheck super.iproute;
# semigroupoids = dontCheck super.semigroupoids; semigroupoids = dontCheck super.semigroupoids;
# wai-app-static = dontCheck super.wai-app-static; wai-app-static = dontCheck super.wai-app-static;
# attoparsec = dontCheck super.attoparsec; attoparsec = dontCheck super.attoparsec;
# http-date = dontCheck super.http-date; http-date = dontCheck super.http-date;
# lens = dontCheck super.lens; lens = dontCheck super.lens;
# unix-time = dontCheck super.unix-time; unix-time = dontCheck super.unix-time;
# http-types = dontCheck super.http-types; http-types = dontCheck super.http-types;
# servant = dontCheck super.servant; servant = dontCheck super.servant;
# servant-server = dontCheck super.servant-server; servant-server = dontCheck super.servant-server;
# servant-auth-docs = dontCheck super.servant-auth-docs; servant-auth-docs = dontCheck super.servant-auth-docs;
# lens-aeson = dontCheck super.lens-aeson; lens-aeson = dontCheck super.lens-aeson;
# word8 = dontCheck super.word8; word8 = dontCheck super.word8;
# http2 = dontCheck super.http2; http2 = dontCheck super.http2;
# wai-extra = dontCheck super.wai-extra; wai-extra = dontCheck super.wai-extra;
# pgp-wordlist = dontCheck super.pgp-wordlist; pgp-wordlist = dontCheck super.pgp-wordlist;
# prettyprinter = dontCheck super.prettyprinter; prettyprinter = dontCheck super.prettyprinter;
# unliftio = dontCheck super.unliftio; unliftio = dontCheck super.unliftio;
# prettyprinter-ansi-terminal = dontCheck super.prettyprinter-ansi-terminal; prettyprinter-ansi-terminal = dontCheck super.prettyprinter-ansi-terminal;
# distributive = dontCheck super.distributive; distributive = dontCheck super.distributive;
# genvalidity-property = dontCheck super.genvalidity-property; genvalidity-property = dontCheck super.genvalidity-property;
# genvalidity-hspec = dontCheck super.genvalidity-hspec; genvalidity-hspec = dontCheck super.genvalidity-hspec;
# genvalidity = dontCheck super.genvalidity; genvalidity = dontCheck super.genvalidity;
# megaparsec = dontCheck super.megaparsec; megaparsec = dontCheck super.megaparsec;
# ncurses = null; ncurses = null;
# haskeline = super.callHackage "haskeline" "0.7.4.2" {}; haskeline = super.callHackage "haskeline" "0.7.4.2" {};
# terminfo = super.callHackage "terminfo" "0.4.1.1" {}; terminfo = super.callHackage "terminfo" "0.4.1.1" {};
}; };
tools = with haskellPackages; [ tools = with haskellPackages; [
ghcid ghcid

View File

@ -20,6 +20,7 @@ executable frontend
-- other-modules: -- other-modules:
-- other-extensions: -- other-extensions:
build-depends: base >=4.11 && <4.12 build-depends: base >=4.11 && <4.12
, common
, miso , miso
, jsaddle-warp , jsaddle-warp
, mtl , mtl

View File

@ -1,7 +1,7 @@
{ {
"url": "https://github.com/nixos/nixpkgs.git", "url": "https://github.com/nixos/nixpkgs.git",
"rev": "4507926b80c6b8f73053775ffee17f6781c7e7c8", "rev": "e0d250e5cf6d179e1ccc775472d89718f61fcfd1",
"date": "2018-01-08T11:52:28+01:00", "date": "2018-01-08T11:52:28+01:00",
"sha256": "068v9xh7d8klk62p2qwr76fyfqfh1bp08xc12x138g5q6pg6yfzb", "sha256": "1iqpjz4czcpghbv924a5h4jvfmj6c8q6sl3b1z7blz3mi740aivs",
"fetchSubmodules": true "fetchSubmodules": true
} }

View File

@ -2,39 +2,12 @@
let let
config = {
packageOverrides = pkgs: with pkgs.haskell.lib; with pkgs.lib; {
haskell = pkgs.haskell // {
packages = pkgs.haskell.packages // {
ghcjs84 = pkgs.haskell.packages.ghcjs84.override {
overrides = self: super: {
doctest = null;
directory-tree = dontCheck (super.directory-tree);
http-types = dontCheck (super.http-types);
tasty-quickcheck = dontCheck (super.tasty-quickcheck);
scientific = dontCheck (super.scientific);
servant = dontCheck (super.servant);
jsaddle-warp = super.callPackage ./jsaddle-warp-ghcjs.nix {};
ghc = overrideDerivation (super.ghc.override {
ghcjsSrc = pkgs.fetchgit {
url = "https://github.com/ghcjs/ghcjs.git";
rev = "dc190b1bb2453cfa484124e9f335ee3cad1492f7";
sha256 = "0dh52aj0f3700zfyrhisy44b6y9p1bsawwrmd5pllpdyw21zd9lw";
fetchSubmodules = true;
};
}) (drv: { patches = (drv.patches or []) ++ [ ./ghcjs.patch ]; });
};
};
};
};
};
};
pinnedVersion = nixpkgs.lib.importJSON ./nixpkgs-version.json; pinnedVersion = nixpkgs.lib.importJSON ./nixpkgs-version.json;
pinnedPkgs = import (nixpkgs.fetchFromGitHub { pinnedPkgs = import (nixpkgs.fetchFromGitHub {
owner = "NixOS"; owner = "NixOS";
repo = "nixpkgs"; repo = "nixpkgs";
inherit (pinnedVersion) rev sha256; inherit (pinnedVersion) rev sha256;
}) { inherit config; }; }) {};
inherit (pinnedPkgs) pkgs; inherit (pinnedPkgs) pkgs;
in in