-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathshell.nix
More file actions
35 lines (28 loc) · 1.03 KB
/
shell.nix
File metadata and controls
35 lines (28 loc) · 1.03 KB
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
26
27
28
29
30
31
32
33
34
35
{ nixpkgs ? import <nixpkgs> {}, compiler ? "default" }:
let
inherit (nixpkgs) pkgs;
f = { mkDerivation, attoparsec, base, hspec, mono-traversable
, network-uri, semigroups, stdenv, syb, template-haskell, text
, uniplate, yesod, yesod-core, yesod-test
}:
mkDerivation {
pname = "yesod-csp";
version = "0.2.0.0";
src = ./.;
libraryHaskellDepends = [
attoparsec base mono-traversable network-uri semigroups syb
template-haskell text uniplate yesod yesod-core
];
testHaskellDepends = [
attoparsec base hspec network-uri semigroups template-haskell yesod
yesod-test
];
description = "Add CSP headers to Yesod apps";
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