interlude/default.nix

25 lines
597 B
Nix
Raw Normal View History

2016-04-23 18:22:37 +02:00
{ nixpkgs ? import <nixpkgs> {}, compiler ? "default" }:
let
inherit (nixpkgs) pkgs;
f = { mkDerivation, base, singletons, stdenv }:
mkDerivation {
pname = "Interlude";
version = "0.1.0.0";
src = ./.;
libraryHaskellDepends = [ base singletons ];
license = stdenv.lib.licenses.gpl3;
};
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