From 7a5a7c49c4e6a3050e21e7ddb8a7ea0870db1c0f Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Fri, 25 Dec 2015 18:06:14 +0000 Subject: framework for nix build --- shell.nix | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 shell.nix (limited to 'shell.nix') diff --git a/shell.nix b/shell.nix new file mode 100644 index 0000000..2d7864a --- /dev/null +++ b/shell.nix @@ -0,0 +1,17 @@ +{ pkgs ? (import {}) +, compiler ? "ghc7102" +}: + +let + ghc = pkgs.haskell.packages.${compiler}.ghcWithPackages (ps: with ps; [ + cabal-install hlint cabal2nix + ] ++ (builtins.attrValues (import ./default.nix {}))); +in +pkgs.stdenv.mkDerivation rec { + name = "thermoprint-env"; + buildInputs = [ ghc ]; + shellHook = '' + eval $(egrep ^export ${ghc}/bin/ghc) + export PROMPT_INFO="${name}" + ''; +} -- cgit v1.2.3