-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathshell.nix
More file actions
25 lines (18 loc) · 779 Bytes
/
shell.nix
File metadata and controls
25 lines (18 loc) · 779 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
{ nixpkgs ? import <nixpkgs> {}, compiler ? "default" }:
let
inherit (nixpkgs) pkgs;
f = { mkDerivation, base, mtl, stdenv, template-haskell, semigroups, text, th-abstraction, cabal-install }:
mkDerivation {
pname = "boomerang";
version = "1.4.5";
src = ./.;
libraryHaskellDepends = [ base mtl template-haskell semigroups text th-abstraction cabal-install ];
description = "Library for invertible parsing and printing";
license = stdenv.lib.licenses.bsd3;
};
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