mateamt/shell.nix

99 lines
3.6 KiB
Nix
Raw Normal View History

2020-04-17 09:07:50 +00:00
{ nixpkgs ? import <nixpkgs> {}, compiler ? "default", doBenchmark ? false }:
2019-04-15 20:23:25 +00:00
let
2020-04-17 09:07:50 +00:00
inherit (nixpkgs) pkgs;
2021-01-30 19:54:55 +00:00
postgresql-simple-migration = with haskellPackages; callPackage(
{ mkDerivation, base, bytestring, cryptohash
, directory, hspec, lib, postgresql-simple, text, time
}:
mkDerivation {
pname = "postgresql-simple-migration";
version = "0.1.15.0";
sha256 = "6d37425a805c6268f323e63d091020622d17b88b37c8963da0b7d26ea787d648";
isLibrary = true;
isExecutable = true;
libraryHaskellDepends = [
base base64-bytestring bytestring cryptohash directory
postgresql-simple time
];
executableHaskellDepends = [
base base64-bytestring bytestring cryptohash directory
postgresql-simple text time
];
testHaskellDepends = [ base bytestring hspec postgresql-simple ];
homepage = "https://github.com/ameingast/postgresql-simple-migration";
description = "PostgreSQL Schema Migrations";
doCheck = false;
license = lib.licenses.bsd3;
})
{};
base64-bytestring = with haskellPackages; callPackage(
{ mkDerivation, base, bytestring, containers, criterion, deepseq
, HUnit, lib, QuickCheck, split, test-framework
, test-framework-hunit, test-framework-quickcheck2
}:
mkDerivation {
pname = "base64-bytestring";
version = "1.0.0.3";
sha256 = "ef159d60ec14c0a3f3e26bab5c9fd7634d5e1b983c6a64f0b0c3261efe008fc7";
libraryHaskellDepends = [ base bytestring ];
testHaskellDepends = [
base bytestring containers HUnit QuickCheck split test-framework
test-framework-hunit test-framework-quickcheck2
];
benchmarkHaskellDepends = [
base bytestring containers criterion deepseq
];
homepage = "https://github.com/haskell/base64-bytestring";
description = "Fast base64 encoding and decoding for ByteStrings";
license = lib.licenses.bsd3;
})
{};
2020-04-17 09:07:50 +00:00
f = { mkDerivation, aeson, base, base16-bytestring
2021-01-30 19:54:55 +00:00
, bytestring, case-insensitive, clock
, containers, extra, HsYAML, http-api-data, http-types, iproute
, mtl, network, opaleye, optparse-applicative, postgresql-simple
2021-01-30 19:54:55 +00:00
, product-profunctors, profunctors
2020-05-10 05:28:17 +00:00
, pureMD5, random-bytestring, servant, servant-rawm, servant-server
, stdenv, stm, text, time, wai, wai-logger, wai-middleware-throttle
, warp
2020-04-17 09:07:50 +00:00
}:
mkDerivation {
pname = "mateamt";
version = "0.0.0.0";
src = ./.;
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 = [
2020-05-10 05:28:17 +00:00
base base16-bytestring bytestring case-insensitive clock containers
extra HsYAML iproute mtl network opaleye optparse-applicative
2020-05-10 05:28:17 +00:00
postgresql-simple postgresql-simple-migration servant
servant-server stm text time wai wai-logger wai-middleware-throttle
warp
2020-04-17 09:07:50 +00:00
];
description = "A whole new matemat";
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 {});
2019-04-15 20:23:25 +00:00
in
2020-04-17 09:07:50 +00:00
if pkgs.lib.inNixShell then drv.env else drv