foo
This commit is contained in:
parent
a4cff9f7aa
commit
28b691bbd0
3 changed files with 96 additions and 38 deletions
|
@ -26,7 +26,7 @@ executable mateamt
|
||||||
, AppTypes.Configuration
|
, AppTypes.Configuration
|
||||||
, Janitor
|
, Janitor
|
||||||
-- other-extensions:
|
-- other-extensions:
|
||||||
build-depends: base ^>=4.12.0.0
|
build-depends: base >=4.12.0.0 && < 5
|
||||||
, mateamt
|
, mateamt
|
||||||
, text
|
, text
|
||||||
, bytestring
|
, bytestring
|
||||||
|
@ -43,7 +43,7 @@ executable mateamt
|
||||||
, warp
|
, warp
|
||||||
, wai
|
, wai
|
||||||
, wai-logger
|
, wai-logger
|
||||||
, HsYAML
|
, HsYAML >= 0.2.1.0
|
||||||
, optparse-applicative
|
, optparse-applicative
|
||||||
hs-source-dirs: app
|
hs-source-dirs: app
|
||||||
ghc-options: -Wall
|
ghc-options: -Wall
|
||||||
|
@ -77,10 +77,10 @@ library
|
||||||
, Types.Avatar
|
, Types.Avatar
|
||||||
, Util
|
, Util
|
||||||
-- other-extensions:
|
-- other-extensions:
|
||||||
build-depends: base ^>=4.12.0.0
|
build-depends: base >=4.12.0.0 && < 5
|
||||||
, servant
|
, servant
|
||||||
, servant-server
|
, servant-server
|
||||||
, servant-rawm
|
, servant-rawm >= 0.3.0.0
|
||||||
, opaleye
|
, opaleye
|
||||||
, aeson
|
, aeson
|
||||||
, text
|
, text
|
||||||
|
|
76
shell.nix
76
shell.nix
|
@ -4,22 +4,80 @@ let
|
||||||
|
|
||||||
inherit (nixpkgs) pkgs;
|
inherit (nixpkgs) pkgs;
|
||||||
|
|
||||||
f = { mkDerivation, aeson, base, base16-bytestring, bytestring
|
servant-rawm = with haskellPackages; callPackage(
|
||||||
, containers, http-api-data, mtl, opaleye, postgresql-simple
|
{ mkDerivation, base, bytestring, doctest, filepath, Glob
|
||||||
, product-profunctors, random-bytestring, servant, servant-server
|
, hspec-wai, http-client, http-media, http-types, lens, resourcet
|
||||||
, stdenv, stm, text, time, wai, wai-logger, warp
|
, servant, servant-client, servant-client-core, servant-docs
|
||||||
|
, servant-server, stdenv, tasty, tasty-hspec, tasty-hunit, text
|
||||||
|
, transformers, wai, wai-app-static, warp
|
||||||
|
}:
|
||||||
|
mkDerivation {
|
||||||
|
pname = "servant-rawm";
|
||||||
|
version = "0.3.2.0";
|
||||||
|
sha256 = "2d90c1f6a284673ed28fc617170f191f5ed2f45ffd14e61fe49c575a7f426d04";
|
||||||
|
isLibrary = true;
|
||||||
|
isExecutable = true;
|
||||||
|
libraryHaskellDepends = [
|
||||||
|
base bytestring filepath http-client http-media http-types lens
|
||||||
|
resourcet servant-client servant-client-core servant-docs
|
||||||
|
servant-server wai wai-app-static
|
||||||
|
];
|
||||||
|
testHaskellDepends = [
|
||||||
|
base bytestring doctest Glob hspec-wai http-client http-media
|
||||||
|
http-types servant servant-client servant-client-core
|
||||||
|
servant-server tasty tasty-hspec tasty-hunit text transformers wai
|
||||||
|
warp
|
||||||
|
];
|
||||||
|
homepage = "https://github.com/cdepillabout/servant-rawm";
|
||||||
|
description = "Embed a raw 'Application' in a Servant API";
|
||||||
|
license = stdenv.lib.licenses.bsd3;
|
||||||
|
}) {};
|
||||||
|
|
||||||
|
HsYAML = with haskellPackages; callPackage(
|
||||||
|
{ mkDerivation, base, bytestring, containers, deepseq, mtl, parsec
|
||||||
|
, QuickCheck, stdenv, tasty, tasty-quickcheck, text
|
||||||
|
}:
|
||||||
|
mkDerivation {
|
||||||
|
pname = "HsYAML";
|
||||||
|
version = "0.2.1.0";
|
||||||
|
sha256 = "60f727d5c90e693ef71df7dcbed8f40b66d2db11375528043e0326749e861f83";
|
||||||
|
isLibrary = true;
|
||||||
|
isExecutable = true;
|
||||||
|
libraryHaskellDepends = [
|
||||||
|
base bytestring containers deepseq mtl parsec text
|
||||||
|
];
|
||||||
|
testHaskellDepends = [
|
||||||
|
base bytestring containers mtl QuickCheck tasty tasty-quickcheck
|
||||||
|
text
|
||||||
|
];
|
||||||
|
homepage = "https://github.com/hvr/HsYAML";
|
||||||
|
description = "Pure Haskell YAML 1.2 processor";
|
||||||
|
license = stdenv.lib.licenses.gpl2;
|
||||||
|
}) {};
|
||||||
|
|
||||||
|
f = { mkDerivation, aeson, base, base16-bytestring
|
||||||
|
, base64-bytestring, bytestring, containers, http-api-data
|
||||||
|
, http-types, mtl, network, opaleye, optparse-applicative
|
||||||
|
, postgresql-simple, product-profunctors, profunctors, pureMD5
|
||||||
|
, random-bytestring, servant, servant-server, stdenv
|
||||||
|
, stm, text, time, wai, wai-logger, warp
|
||||||
}:
|
}:
|
||||||
mkDerivation {
|
mkDerivation {
|
||||||
pname = "mateamt";
|
pname = "mateamt";
|
||||||
version = "0.0.0.0";
|
version = "0.0.0.0";
|
||||||
src = ./.;
|
src = ./.;
|
||||||
configureFlags = [ "-fdevelop" ];
|
isLibrary = true;
|
||||||
isLibrary = false;
|
|
||||||
isExecutable = true;
|
isExecutable = true;
|
||||||
|
libraryHaskellDepends = [
|
||||||
|
aeson base base16-bytestring base64-bytestring bytestring
|
||||||
|
containers http-api-data http-types mtl opaleye postgresql-simple
|
||||||
|
product-profunctors profunctors pureMD5 random-bytestring servant
|
||||||
|
servant-rawm servant-server stm text time wai wai-logger warp
|
||||||
|
];
|
||||||
executableHaskellDepends = [
|
executableHaskellDepends = [
|
||||||
aeson base base16-bytestring bytestring containers http-api-data
|
base base16-bytestring bytestring containers HsYAML mtl network
|
||||||
mtl opaleye postgresql-simple product-profunctors random-bytestring
|
opaleye optparse-applicative postgresql-simple servant
|
||||||
servant servant-server stm text time wai wai-logger warp
|
servant-server stm text time wai wai-logger warp
|
||||||
];
|
];
|
||||||
description = "A whole new matemat";
|
description = "A whole new matemat";
|
||||||
license = stdenv.lib.licenses.agpl3;
|
license = stdenv.lib.licenses.agpl3;
|
||||||
|
|
50
src/API.hs
50
src/API.hs
|
@ -91,39 +91,39 @@ buyLink :: Link
|
||||||
|
|
||||||
journalShowLink :: Maybe Int -> Maybe Int -> Link
|
journalShowLink :: Maybe Int -> Maybe Int -> Link
|
||||||
|
|
||||||
avatarGetLink :: Int -> Link
|
-- avatarGetLink :: Int -> Link
|
||||||
avaterInsertLink :: Link
|
avaterInsertLink :: Link
|
||||||
avatarUpdateLink :: Int -> Link
|
avatarUpdateLink :: Int -> Link
|
||||||
avatarListLink :: Link
|
avatarListLink :: Link
|
||||||
|
|
||||||
( (authGetLink :: Link) :<|>
|
( authGetLink :<|>
|
||||||
(authSendLink :: Link) :<|>
|
authSendLink :<|>
|
||||||
(authLogoutLink :: Link) :<|>
|
authLogoutLink :<|>
|
||||||
|
|
||||||
(authManageListLink :: Link) :<|>
|
authManageListLink :<|>
|
||||||
(authManageNewAuthLink :: Link) :<|>
|
authManageNewAuthLink :<|>
|
||||||
(authManageDeleteAuthLink :: Link) :<|>
|
authManageDeleteAuthLink :<|>
|
||||||
|
|
||||||
(userNewLink :: Link) :<|>
|
userNewLink :<|>
|
||||||
(userGetLink :: Link) :<|>
|
userGetLink :<|>
|
||||||
(userUpdateLink :: Link) :<|>
|
userUpdateLink :<|>
|
||||||
(userListLink :: Maybe UserRefine -> Link) :<|>
|
userListLink :<|>
|
||||||
(userRechargeLink :: Link) :<|>
|
userRechargeLink :<|>
|
||||||
(userTransferLink :: Link) :<|>
|
userTransferLink :<|>
|
||||||
|
|
||||||
(productNewLink :: Link) :<|>
|
productNewLink :<|>
|
||||||
(productOverviewLink :: Int -> Link) :<|>
|
productOverviewLink :<|>
|
||||||
(productStockRefillLink :: Link) :<|>
|
productStockRefillLink :<|>
|
||||||
(productStockUpdateLink :: Link) :<|>
|
productStockUpdateLink :<|>
|
||||||
(productListLink :: Maybe ProductRefine -> Link) :<|>
|
productListLink :<|>
|
||||||
(productShortListLink :: Maybe ProductRefine -> Link) :<|>
|
productShortListLink :<|>
|
||||||
|
|
||||||
(buyLink :: Link) :<|>
|
buyLink :<|>
|
||||||
|
|
||||||
(journalShowLink :: Maybe Int -> Maybe Int -> Link) :<|>
|
journalShowLink :<|>
|
||||||
|
|
||||||
(avatarGetLink :: Int -> Link) :<|>
|
avatarGetLink :<|>
|
||||||
(avaterInsertLink :: Link) :<|>
|
avaterInsertLink :<|>
|
||||||
(avatarUpdateLink :: Int -> Link) :<|>
|
avatarUpdateLink :<|>
|
||||||
(avatarListLink :: Link)
|
avatarListLink
|
||||||
) = allLinks (Proxy :: Proxy MateAPI)
|
) = allLinks (Proxy :: Proxy MateAPI)
|
||||||
|
|
Loading…
Reference in a new issue