From d3f3890dc5408581eb6181125c871d1cf2c0e18f Mon Sep 17 00:00:00 2001 From: Griffin Smith Date: Sun, 25 Aug 2019 13:28:10 -0400 Subject: An @-sign in a box, in haskell Initial commit of a Haskell version of Xanthous, written using Brick and built with Nix. This is so much nicer and so much easier --- shell.nix | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 shell.nix (limited to 'shell.nix') diff --git a/shell.nix b/shell.nix new file mode 100644 index 0000000000..aefc492d3d --- /dev/null +++ b/shell.nix @@ -0,0 +1,28 @@ +{ nixpkgs ? import {}, compiler ? "ghc865", withHoogle ? true }: +let + inherit (nixpkgs) pkgs; + + xan = import ./xanthous.nix; + + packageSet = ( + if compiler == "default" + then pkgs.haskellPackages + else pkgs.haskell.packages.${compiler} + ); + + haskellPackages = ( + if withHoogle + then packageSet.override { + overrides = (self: super: { + ghc = super.ghc // { withPackages = super.ghc.withHoogle; }; + ghcWithPackages = self.ghc.withPackages; + }); + } + else packageSet + ); + + drv = haskellPackages.callPackage xan {}; + + inherit (pkgs.haskell.lib) addBuildTools; +in +(addBuildTools drv (with haskellPackages; [ cabal-install ])).env -- cgit 1.4.1