forked from quickstrom/quickstrom
-
Notifications
You must be signed in to change notification settings - Fork 0
/
shell.nix
62 lines (52 loc) · 1.76 KB
/
shell.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
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
{ pkgs ? import ./nixpkgs.nix { config = { allowBroken = true; }; }
, compiler ? "ghc865" }:
let
fonts = with pkgs; [ libre-baskerville iosevka opensans-ttf ];
inherit (pkgs.lib.systems.elaborate { system = builtins.currentSystem; })
isLinux;
easy-ps = import ./dsl/easy-ps.nix { inherit pkgs; };
dsl = import ./dsl { inherit pkgs; };
client-side = import ./client-side { inherit pkgs; };
quickstrom-purs-ide = pkgs.writeShellScriptBin "quickstrom-purs-ide" ''
${easy-ps.purs-0_13_8}/bin/purs ide server \
--log-level all \
--output-directory dsl/output \
'dsl/src/**/*.purs' \
'dsl/.spago/**/*.purs' \
'specs/**/*.purs'
'';
quickstrom-format-sources =
pkgs.writeShellScriptBin "quickstrom-format-sources" ''
find . -not -path './dist-newstyle/*' -name '*.hs' -exec ormolu -m inplace {} \;
find . -not -path './dsl/.spago/*' -name '*.purs' -exec purty --write {} \;
'';
docs = import ./docs { inherit pkgs; };
quickstrom = import ./. { inherit pkgs compiler; };
in quickstrom.haskellPackages.shellFor {
withHoogle = true;
packages = with pkgs.lib; (p: attrValues (filterAttrs (n: _: hasPrefix "quickstrom-" n) p));
buildInputs = (with pkgs; [
nixfmt
ghcid
quickstrom.haskellPackages.haskell-language-server
cabal-install
quickstrom.haskellPackages.ormolu
easy-ps.purty
quickstrom-purs-ide
quickstrom-format-sources
docs.dependencies
docs.publish
# only for lorri
dsl
client-side
] ++ lib.optional isLinux [
firefox
geckodriver
chromium
chromedriver
selenium-server-standalone
]);
FONTCONFIG_FILE = pkgs.makeFontsConf { fontDirectories = fonts; };
QUICKSTROM_LIBRARY_DIR = "${dsl}";
QUICKSTROM_CLIENT_SIDE_DIR = "${client-side}";
}