From 19732ae8d1da6347ab48c1123758fde6ace7a734 Mon Sep 17 00:00:00 2001 From: Ben Sima Date: Sat, 31 Aug 2019 00:42:02 -0700 Subject: pack: a common bild function --- pack/ibb.nix | 82 +++++++++++++++++++++--------------------------------------- 1 file changed, 28 insertions(+), 54 deletions(-) (limited to 'pack/ibb.nix') diff --git a/pack/ibb.nix b/pack/ibb.nix index fe74346..c531a34 100644 --- a/pack/ibb.nix +++ b/pack/ibb.nix @@ -1,56 +1,30 @@ -{ nixpkgs }: -with nixpkgs; -let - ghc = pkgs.haskell.packages.ghc844.ghcWithPackages (hp: with hp; [ - hinotify - - acid-state - blaze-html - blaze-markup - bytestring - miso - MonadRandom - protolude - random - scotty - servant - servant-server - shakespeare - text - ]); - ghcjs_ = pkgs.haskell.packages.ghcjs.override (oldAttrs: { - overrides = with pkgs.haskell.lib; self: super: { - http-types = dontCheck super.http-types; - tasty-quickcheck = dontCheck super.tasty-quickcheck; - scientific = dontCheck super.scientific; # takes forever - servant = dontCheck super.servant; - comonad = dontCheck super.comonad; - QuickCheck = dontCheck super.QuickCheck; - }; - }); - ghcjs = ghcjs_.ghcWithPackages (hp: with hp; [ - aeson - containers - ghcjs-base - miso - protolude - servant - text - ]); - make = ../chip/make; - entrypoint = "Ibb"; -in -stdenv.mkDerivation rec { +{ name = "ibb"; - version = "0"; - src = ../.; - nativeBuildInputs = [ - ghc ghcjs - ]; - strictDeps = true; - buildPhase = "${ghc}/bin/runhaskell ${make} ibb"; - installPhase = '' - mkdir -p $out/bin - cp bild/${name} $out/bin/${name} - ''; + deps = { + both = [ + "miso" + "protolude" + "servant" + "text" + ]; + apex = [ + "MonadRandom" + "acid-state" + "blaze-html" + "blaze-markup" + "bytestring" + "ixset" + "random" + "safecopy" + "scotty" + "servant-server" + "shakespeare" + "text" + ]; + aero = [ + "aeson" + "containers" + "ghcjs-base" + ]; + }; } -- cgit v1.2.3