summaryrefslogtreecommitdiff
path: root/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'default.nix')
-rw-r--r--default.nix51
1 files changed, 8 insertions, 43 deletions
diff --git a/default.nix b/default.nix
index 566e710..95764eb 100644
--- a/default.nix
+++ b/default.nix
@@ -1,53 +1,18 @@
-{ nixpkgs ? import <nixpkgs> {}, compiler ? "default", doBenchmark ? false }:
+{ nixpkgs ? import <nixpkgs> {}, compiler ? "default" }:
let
inherit (nixpkgs) pkgs;
- f = { mkDerivation, aeson, aeson-pretty, async, base, base-compat
- , base64-bytestring, bytestring, containers, cryptohash-sha1
- , deepseq, directory, dotgen, either, extra, filepath, fmt
- , getopt-generics, hpack, http-client, http-types, lib, lucid
- , microlens-platform, monad-logger, network-uri, process
- , regex-tdfa, servant, servant-client, servant-lucid
- , servant-server, servant-websockets, stm, template-haskell, text
- , text-metrics, time, tomland, transformers, universum, uri-encode
- , uuid, vector, wai, wai-extra, warp, websockets
- }:
- mkDerivation {
- pname = "walint";
- version = "0.1";
- src = ./.;
- isLibrary = true;
- isExecutable = true;
- libraryHaskellDepends = [
- aeson base bytestring containers deepseq dotgen either extra
- filepath getopt-generics network-uri regex-tdfa text text-metrics
- transformers universum uri-encode vector
- ];
- libraryToolDepends = [ hpack ];
- executableHaskellDepends = [
- aeson aeson-pretty async base base-compat base64-bytestring
- bytestring containers cryptohash-sha1 directory extra filepath fmt
- getopt-generics http-client http-types lucid microlens-platform
- monad-logger process servant servant-client servant-lucid
- servant-server servant-websockets stm template-haskell text time
- tomland universum uuid wai wai-extra warp websockets
- ];
- doHaddock = false;
- prePatch = "hpack";
- homepage = "https://stuebinm.eu/git/walint";
- license = "unknown";
- hydraPlatforms = lib.platforms.none;
- };
-
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 {});
+ inherit (haskellPackages) callPackage;
-in
- drv
+in rec {
+ tiled = callPackage ./tiled {};
+ walint = callPackage ./walint { inherit tiled; };
+ walint-cli = callPackage ./walint-cli { inherit walint; };
+ server = callPackage ./server { inherit walint; };
+}