Created
February 18, 2017 14:07
-
-
Save bennofs/43ce54686f91222e80afb120e40ef413 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ nixpkgs ? import <nixpkgs> {}, compiler ? "ghc7103" }: | |
let | |
inherit (nixpkgs) pkgs; | |
f = { mkDerivation, base, containers, haskeline, llvm-general | |
, llvm-general-pure, mtl, parsec, stdenv, transformers | |
}: | |
mkDerivation { | |
pname = "kaleidoscope"; | |
version = "0.1.0.0"; | |
src = ./.; | |
isLibrary = true; | |
isExecutable = true; | |
libraryHaskellDepends = [ | |
base haskeline llvm-general llvm-general-pure mtl transformers | |
]; | |
executableHaskellDepends = [ | |
base containers haskeline llvm-general llvm-general-pure mtl parsec | |
transformers | |
]; | |
homepage = "https://github.com/sdiehl/kaleidoscope"; | |
description = "Haskell Kaleidoscope tutorial"; | |
license = stdenv.lib.licenses.mit; | |
}; | |
haskellPackages = if compiler == "default" | |
then pkgs.haskellPackages | |
else pkgs.haskell.packages.${compiler}; | |
drv = haskellPackages.callPackage f {}; | |
in | |
if pkgs.lib.inNixShell then drv.env else drv |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment