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 --- default.nix | 5 +++++ shell.nix | 17 +++++++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 default.nix create mode 100644 shell.nix diff --git a/default.nix b/default.nix new file mode 100644 index 0000000..cb997b7 --- /dev/null +++ b/default.nix @@ -0,0 +1,5 @@ +{ pkgs ? (import {}) +}: + +rec { +} 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