From 5a9ca5c89aa32331450609e13aab1cfb56d9020b Mon Sep 17 00:00:00 2001 From: Nick Date: Fri, 25 Jan 2019 10:30:03 -0800 Subject: Implement a basic mock-up of IBB --- ibb/default.nix | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) (limited to 'ibb/default.nix') diff --git a/ibb/default.nix b/ibb/default.nix index 4384001..1d6a065 100644 --- a/ibb/default.nix +++ b/ibb/default.nix @@ -1,23 +1,23 @@ -{ stdenv -, mkDerivation -, base +{ compiler ? "ghc843" +, doHaddock ? false +, doBenchmark ? false +, doCheck ? true +, withHoogle ? false +, pkgs ? import (fetchGit (import ../pkgs.nix)) {} }: -mkDerivation { - pname = "ibb"; - version = "0"; - src = ./.; - isExecutable = true; - libraryHaskellDepends = [ - base - ]; - executableHaskellDepends = [ - base - ]; - testHaskellDepends = [ - base - ]; - homepage = "https://git.sr.ht/~ben/biz"; - description = "biz"; - license = stdenv.lib.licenses.bsd3; -} +with pkgs; + +haskell.packages.${compiler}.developPackage { + root = ./.; + overrides = with haskell.lib; self: super: { + ghc = + if withHoogle + then super.ghc // {withPackages = super.ghc.withHoogle;} + else super.ghc; + ghcWithPackages = + if withHoogle + then self.ghc.withPackages + else super.ghcWithPackages; + }; +} \ No newline at end of file -- cgit v1.2.3