Add nix expressions

This commit is contained in:
Ollie Charles 2017-01-19 21:52:49 +00:00
parent 2c6c8bc806
commit 53b370819a
2 changed files with 35 additions and 0 deletions

14
default.nix Normal file
View File

@ -0,0 +1,14 @@
{ mkDerivation, base, one-liner, opaleye, postgresql-simple
, product-profunctors, profunctors, scientific, stdenv, streaming
, tagged, text, exceptions, free
}:
mkDerivation {
pname = "rel8";
version = "0.1.0.0";
src = ./.;
libraryHaskellDepends = [
base one-liner opaleye postgresql-simple product-profunctors
profunctors scientific streaming tagged text exceptions free
];
license = stdenv.lib.licenses.bsd3;
}

21
shell.nix Normal file
View File

@ -0,0 +1,21 @@
{ nixpkgs ? import <nixpkgs> {} }:
let
inherit (nixpkgs) pkgs;
f = import ./.;
haskellPackages =
pkgs.haskell.packages.ghc802.override {
overrides = self: super: {
one-liner = super.callPackage /home/ollie/work/one-liner {};
opaleye = pkgs.haskell.lib.dontCheck (super.callPackage /home/ollie/work/opaleye {});
};
};
drv = haskellPackages.callPackage f {};
in
if pkgs.lib.inNixShell then drv.env else drv