From 448046fd26c4f04cecde5b7496eaff746981ec67 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Tue, 2 Aug 2016 20:56:44 +0200 Subject: Framework --- shell.nix | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 shell.nix (limited to 'shell.nix') diff --git a/shell.nix b/shell.nix new file mode 100644 index 0000000..6ed4ca8 --- /dev/null +++ b/shell.nix @@ -0,0 +1,19 @@ +{ pkgs ? (import {}) +, haskellPackages ? (import ./default.nix {}).haskellPackages +}: + +let + trivstreamPackages = builtins.attrValues (import ./default.nix {}); + ghc = haskellPackages.ghcWithPackages + (ps: trivstreamPackages ++ utilities ps ++ testDeps ps); + utilities = (ps: with ps; [ hlint cabal2nix ]); + testDeps = (ps: with ps; [ ]); +in +pkgs.stdenv.mkDerivation rec { + name = "trivstream-env"; + buildInputs = [ ghc ]; + shellHook = '' + eval $(egrep ^export ${ghc}/bin/ghc) + export PROMPT_INFO="${name}" + ''; +} -- cgit v1.2.3