From 9110064fe62f98dd3ecc5fb4c3915a843492b8fb Mon Sep 17 00:00:00 2001 From: stuebinm Date: Mon, 23 Oct 2023 23:18:34 +0200 Subject: a year went by This does many meta-things, but changes no functionality: - get rid of stack, and use just cabal with a stackage snapshot instead (why did I ever think stack was a good idea?) - update the stackage snapshot to something halfway recent - thus making builds work on nixpkgs-23.05 (current stable) - separating out packages into their own cabal files - use the GHC2021 set of extensions as default - very slight code changes to make things build again - update readme accordingly - stylish-haskell run --- default.nix | 51 ++++++++------------------------------------------- 1 file changed, 8 insertions(+), 43 deletions(-) (limited to 'default.nix') diff --git a/default.nix b/default.nix index 566e710..95764eb 100644 --- a/default.nix +++ b/default.nix @@ -1,53 +1,18 @@ -{ nixpkgs ? import {}, compiler ? "default", doBenchmark ? false }: +{ nixpkgs ? import {}, 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; }; +} -- cgit v1.2.3