interlude/default.nix
2016-11-16 01:03:51 +01:00

26 lines
666 B
Nix

{ nixpkgs ? import <nixpkgs> {}, compiler ? "default" }:
let
inherit (nixpkgs) pkgs;
f = { mkDerivation, base, integer-gmp, singletons, stdenv }:
mkDerivation {
pname = "Interlude";
version = "0.1.0.0";
src = ./.;
libraryHaskellDepends = [ base integer-gmp singletons ];
description = "My take on Prelude";
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