25 lines
597 B
Nix
25 lines
597 B
Nix
|
{ 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
|