matebeamter/shell.nix

126 lines
4.7 KiB
Nix
Raw Normal View History

{ nixpkgs ? import <nixpkgs> {}, compiler ? "default", doBenchmark ? false }:
let
inherit (nixpkgs) pkgs;
mateamt =
haskellPackages.callPackage(
{ mkDerivation, aeson, base, base16-bytestring, base64-bytestring
, bytestring, case-insensitive, clock, containers, HsYAML
, http-api-data, http-types, iproute, mtl, network, opaleye
, optparse-applicative, postgresql-simple
, postgresql-simple-migration, product-profunctors, profunctors
, pureMD5, random-bytestring, servant, servant-rawm, servant-server
, stdenv, stm, text, time, wai, wai-logger, wai-middleware-throttle
, warp
}:
mkDerivation {
pname = "mateamt";
version = "0.0.0.0";
src = ../mateamt;
isLibrary = 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 = [
base base16-bytestring bytestring case-insensitive clock containers
HsYAML iproute mtl network opaleye optparse-applicative
postgresql-simple postgresql-simple-migration servant
servant-server stm text time wai wai-logger wai-middleware-throttle
warp
];
description = "A whole new matemat";
license = stdenv.lib.licenses.agpl3;
}
) {};
HsYAML =
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;
}) {};
i18n =
haskellPackages.callPackage(
{ mkDerivation, base, containers, directory, filepath, hspec, mtl
, parsec, stdenv, tasty, tasty-hspec, text, transformers
}:
mkDerivation {
pname = "i18n";
version = "0.4.0.0";
sha256 = "7e0df375883fb3428b0cd20aac1163ea38de80fd3499ec3007979b36fe2f93fa";
revision = "1";
editedCabalFile = "1sxiifn4m17294inyb4q7isbdd3s77zpqxafghpbfkz5hkrv0xxg";
libraryHaskellDepends = [
base containers directory filepath mtl parsec text transformers
];
testHaskellDepends = [
base containers hspec tasty tasty-hspec text
];
doCheck = false;
homepage = "https://github.com/filib/i18n";
description = "Internationalization for Haskell";
license = stdenv.lib.licenses.bsd3;
}
) {};
f = { mkDerivation, aeson, base, base64-bytestring, blaze-html
, blaze-markup, bytestring, cookie, cryptonite, either, hashable
, http-api-data, http-client, http-types
, mtl, optparse-applicative, random-bytestring, servant
, servant-blaze, servant-client, servant-client-core, servant-rawm
, servant-server, split, stdenv, stm, text, wai, wai-app-static
, wai-logger, wai-session, warp
}:
mkDerivation {
pname = "matebeamter";
version = "0.0.0.0";
src = ./.;
isLibrary = false;
isExecutable = true;
executableHaskellDepends = [
aeson base base64-bytestring blaze-html blaze-markup bytestring
cookie cryptonite either hashable HsYAML http-api-data http-client
http-types i18n mateamt mtl optparse-applicative random-bytestring
servant servant-blaze servant-client servant-client-core
servant-rawm servant-server split stm text wai wai-app-static
wai-logger wai-session warp
];
description = "A reference frontent to mateamt";
license = stdenv.lib.licenses.agpl3;
};
haskellPackages = if compiler == "default"
then pkgs.haskellPackages
else pkgs.haskell.packages.${compiler};
variant = if doBenchmark then pkgs.haskell.lib.doBenchmark else pkgs.lib.id;
drv = variant (haskellPackages.callPackage f {});
in
if pkgs.lib.inNixShell then drv.env else drv