-
Notifications
You must be signed in to change notification settings - Fork 5
/
default.nix
24 lines (20 loc) · 877 Bytes
/
default.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
{ nixpkgs ? import ./nix/nixpkgs.nix {}, compiler ? "default" }:
let
inherit (nixpkgs) pkgs;
haskellPackages = if compiler == "default"
then pkgs.haskellPackages
else pkgs.haskell.packages.${compiler};
webauthn = haskellPackages.callCabal2nix "webauthn" ./webauthn {};
wai-middleware-webauthn = haskellPackages.callCabal2nix "wai-middleware-webauthn" ./wai-middleware-webauthn {
webauthn = webauthn;
};
demo = haskellPackages.callCabal2nix "demo" ./wai-middleware-webauthn/demo {
wai-middleware-webauthn = wai-middleware-webauthn;
};
in
if pkgs.lib.inNixShell
then haskellPackages.shellFor {
packages = ps: [ webauthn wai-middleware-webauthn demo ];
buildInputs = with pkgs; [ cabal-install hlint haskell.packages.ghc884.haskell-language-server ];
}
else webauthn