-
-
Notifications
You must be signed in to change notification settings - Fork 161
Expand file tree
/
Copy pathdefault.nix
More file actions
120 lines (100 loc) · 3.1 KB
/
default.nix
File metadata and controls
120 lines (100 loc) · 3.1 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
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
{ overlays ? []
}:
with (import ./nix { inherit overlays; });
with pkgs.haskell.lib;
{
inherit pkgs legacyPkgs;
# hackage release
release =
with pkgs.haskell.packages.ghc9122;
sdistTarball (buildStrictly miso);
# ghcjs9122
miso-ghcjs-9122 = pkgs.pkgsCross.ghcjs.haskell.packages.ghc9122.miso;
sample-app-js-9122 = pkgs.pkgsCross.ghcjs.haskell.packages.ghc9122.sample-app-js;
miso-tests = pkgs.pkgsCross.ghcjs.haskell.packages.ghc9122.miso-tests;
# ghcjs86
miso-ghcjs = legacyPkgs.haskell.packages.ghcjs.miso;
miso-ghcjs-prod = legacyPkgs.haskell.packages.ghcjs86.miso-prod;
inherit (legacyPkgs.haskell.packages.ghcjs) sample-app-js;
# miso x86
miso-ghc = legacyPkgs.haskell.packages.ghc865.miso;
miso-ghc-9122 = pkgs.haskell.packages.ghc9122.miso;
miso-tests-ghc = pkgs.haskell.packages.ghc9122.miso;
# sample app legacy build
inherit (legacyPkgs.haskell.packages.ghc865)
sample-app;
# sample app
sample-app-ghc9122 =
pkgs.haskell.packages.ghc9122.sample-app;
# Miso wasm examples
inherit (pkgs)
sampleWasm;
# wasm utils
inherit (pkgs)
wasm-ghc
ghc-wasm-meta;
# ghciwatch
inherit (pkgs)
ghciwatch;
# utils
inherit (pkgs.haskell.packages.ghc9122)
miso-from-html;
# hls
inherit (pkgs.haskell.packages.ghc9122)
haskell-language-server;
# dmj: make a NixOS test to ensure examples can be hosted
# dry-running this ensures we catch the failure before deploy
inherit (legacyPkgs)
nginx-nixos-test;
# bun
inherit (pkgs)
bun;
playwright-ghcjs = pkgs.writeScriptBin "playwright" ''
#!${pkgs.stdenv.shell}
export PLAYWRIGHT_BROWSERS_PATH=${pkgs.playwright-driver.browsers}
export PATH="${pkgs.lib.makeBinPath [ pkgs.http-server pkgs.bun ]}:$PATH"
bun install playwright@1.53
http-server ${legacyPkgs.haskell.packages.ghcjs.miso-tests}/bin/component-tests.jsexe &
cd tests
bun run ../ts/playwright.ts
exit_code=$?
pkill http-server
exit "$exit_code"
'';
playwright-js = pkgs.writeScriptBin "playwright" ''
#!${pkgs.stdenv.shell}
export PLAYWRIGHT_BROWSERS_PATH=${pkgs.playwright-driver.browsers}
export PATH="${pkgs.lib.makeBinPath [ pkgs.http-server pkgs.bun ]}:$PATH"
bun install playwright@1.53
http-server ${pkgs.pkgsCross.ghcjs.haskell.packages.ghc9122.miso-tests}/bin/component-tests.jsexe &
cd tests
bun run ../ts/playwright.ts
exit_code=$?
pkill http-server
exit "$exit_code"
'';
playwright-wasm = pkgs.writeScriptBin "playwright" ''
#!${pkgs.stdenv.shell}
export PLAYWRIGHT_BROWSERS_PATH=${pkgs.playwright-driver.browsers}
export PATH="${pkgs.lib.makeBinPath [ pkgs.http-server pkgs.bun ]}:$PATH"
bun install playwright@1.53
cd tests
nix develop .#wasm --command bash -c 'make'
http-server ./public &
bun run ../ts/playwright.ts
exit_code=$?
pkill http-server
exit "$exit_code"
'';
inherit (pkgs)
nurl;
# favicon.ico and miso.png
miso-logos = pkgs.stdenv.mkDerivation {
name = "miso-logos";
src = ./logo;
buildCommand = ''
mkdir -p $out
cp -v $src/* $out/
'';
};
}