Skip to content

Commit 8ef5848

Browse files
committed
delivery-calculator wasm wip
1 parent 8688db1 commit 8ef5848

File tree

18 files changed

+1640
-176
lines changed

18 files changed

+1640
-176
lines changed

cabal.project

Lines changed: 60 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -37,50 +37,57 @@ if impl(ghcjs) || arch(javascript) || os(wasi)
3737
package zstd
3838
flags: +standalone
3939
else
40-
allow-older: reanimate:*,
41-
allow-newer: reanimate:*,
42-
reanimate-svg:*,
43-
tdlib:*,
44-
secp256k1-haskell,
45-
packages:
46-
pub/hs-bitcoin-hash/bitcoin-hash/*.cabal
47-
pub/hs-bitcoin-keys/bitcoin-keys/*.cabal
48-
pub/haskell-bitcoin-script/*.cabal
49-
pub/bitfinex-client/*.cabal
50-
pub/singlethongs/*.cabal
51-
pub/functora/src/*.cabal
52-
pub/vector-space/*.cabal
53-
pub/witch-mini/*.cabal
54-
pub/selective/*.cabal
55-
pub/universum/*.cabal
56-
pub/functora/*.cabal
57-
pub/xlsx/*.cabal
58-
ghcjs/*/*.cabal
59-
optional-packages:
60-
prv/*/*.cabal
61-
package postgresql-libpq
62-
flags: +use-pkg-config
63-
source-repository-package
64-
type: git
65-
location: https://github.com/reanimate/reanimate.git
66-
tag: 82638c078c2f62838d8b6cf77a6a138cf37d2f77
67-
--sha256: OkzQZ/Z1h+X6pXuj8lDqqn/6IkEoXZrG6ZMewzXeWEg=
68-
source-repository-package
69-
type: git
70-
location: https://github.com/santiweight/reanimate-svg.git
71-
tag: d63925781efa9834ba35036da83167f55af3c134
72-
--sha256: Xd6P82FepedcjjWRGjVNmdbDKRIH3Zl0haLiF3v1GDw=
73-
source-repository-package
74-
type: git
75-
location: https://github.com/lagunoff/hs-gauge.git
76-
tag: 2b803d12c8bae8d5971748d74234dd5cbb5025a1
77-
--sha256: n4BBVxcsYNYQRTacSfYn7BNFvom8Haf7DXiHT45RAf0=
78-
source-repository-package
79-
type: git
80-
location: https://github.com/hedgehogqa/haskell-hedgehog.git
81-
tag: 328a07f509ce1ae4c2996bfd67dbd1a545bb3b88
82-
--sha256: gaH13GXPYSu3sxBkN0Fp05m4dOuKok6KleJHIuUIyx8=
83-
subdir: hedgehog
40+
if impl(ghc < 9)
41+
tests: true
42+
packages:
43+
pub/hs-bitcoin-hash/bitcoin-hash/*.cabal
44+
pub/hs-bitcoin-keys/bitcoin-keys/*.cabal
45+
pub/haskell-bitcoin-script/*.cabal
46+
pub/functora/src/*.cabal
47+
ghcjs/*/*.cabal
48+
else
49+
allow-older: reanimate:*,
50+
allow-newer: reanimate:*,
51+
reanimate-svg:*,
52+
tdlib:*,
53+
secp256k1-haskell,
54+
packages:
55+
pub/hs-bitcoin-hash/bitcoin-hash/*.cabal
56+
pub/hs-bitcoin-keys/bitcoin-keys/*.cabal
57+
pub/haskell-bitcoin-script/*.cabal
58+
pub/bitfinex-client/*.cabal
59+
pub/singlethongs/*.cabal
60+
pub/functora/src/*.cabal
61+
pub/vector-space/*.cabal
62+
pub/witch-mini/*.cabal
63+
pub/selective/*.cabal
64+
pub/universum/*.cabal
65+
pub/functora/*.cabal
66+
pub/xlsx/*.cabal
67+
ghcjs/*/*.cabal
68+
optional-packages:
69+
prv/*/*.cabal
70+
source-repository-package
71+
type: git
72+
location: https://github.com/reanimate/reanimate.git
73+
tag: 82638c078c2f62838d8b6cf77a6a138cf37d2f77
74+
--sha256: OkzQZ/Z1h+X6pXuj8lDqqn/6IkEoXZrG6ZMewzXeWEg=
75+
source-repository-package
76+
type: git
77+
location: https://github.com/santiweight/reanimate-svg.git
78+
tag: d63925781efa9834ba35036da83167f55af3c134
79+
--sha256: Xd6P82FepedcjjWRGjVNmdbDKRIH3Zl0haLiF3v1GDw=
80+
source-repository-package
81+
type: git
82+
location: https://github.com/lagunoff/hs-gauge.git
83+
tag: 2b803d12c8bae8d5971748d74234dd5cbb5025a1
84+
--sha256: n4BBVxcsYNYQRTacSfYn7BNFvom8Haf7DXiHT45RAf0=
85+
source-repository-package
86+
type: git
87+
location: https://github.com/hedgehogqa/haskell-hedgehog.git
88+
tag: 328a07f509ce1ae4c2996bfd67dbd1a545bb3b88
89+
--sha256: gaH13GXPYSu3sxBkN0Fp05m4dOuKok6KleJHIuUIyx8=
90+
subdir: hedgehog
8491

8592
if os(wasi)
8693
packages:
@@ -93,6 +100,7 @@ if os(wasi)
93100
pub/witch-mini/*.cabal
94101
pub/selective/*.cabal
95102
pub/universum/*.cabal
103+
pub/xlsx/*.cabal
96104
ghcjs/miso-widgets/*.cabal
97105
ghcjs/miso-components/*.cabal
98106
ghcjs/delivery-calculator/*.cabal
@@ -116,12 +124,6 @@ if os(wasi)
116124
location: https://github.com/haskell-servant/servant-jsaddle.git
117125
tag: 6ce40e9f28bc7c648a8ca139603002a600306fbf
118126
--sha256: nz7UuNpux513axNFoeQ8KykBOhyny4FsqZUvw8mRk1k=
119-
source-repository-package
120-
type: git
121-
location: https://github.com/m-ildefons/foundation.git
122-
tag: 4316929e6cbca027e25349710a71548f8f26220a
123-
--sha256: anBAAO44Nny7oHiHwNUD6bPNnxJMTUPCmje7LjbCieo=
124-
subdir: basement
125127
source-repository-package
126128
type: git
127129
location: https://github.com/m-ildefons/hs-memory.git
@@ -132,6 +134,12 @@ if os(wasi)
132134
location: https://github.com/amesgen/entropy.git
133135
tag: f771c8010f001b87c5ccf9b61703b6912f7062d5
134136
--sha256: /Q+40JfnV6EmQoMGyNIhbjyxEAjJNsVZh4xQNRxB+io=
137+
source-repository-package
138+
type: git
139+
location: https://github.com/igrep/foundation.git
140+
tag: 4c719706584d16e865236722712274970a411b22
141+
--sha256: E5hkCE2o0NVr2MP4bLotlt4Du1yRTB0kdZIm/6F4dMM=
142+
subdir: basement foundation
135143
source-repository-package
136144
type: git
137145
location: https://github.com/igrep/xml.git
@@ -148,7 +156,8 @@ if os(wasi)
148156
location: https://github.com/igrep/conduit.git
149157
tag: 6fc823fe35acfff3d324c7ff6596ae4890d1d200
150158
--sha256: AVn8HtqihFcG8j30xbNyu8mwoM+oLpywwx5kckA3ha0=
151-
subdir: conduit-extra
159+
subdir: cereal-conduit conduit-extra conduit network-conduit-tls resourcet
160+
152161
package miso
153162
flags: +jsstring-only
154163
package aeson

ghcjs/delivery-calculator/flake.nix

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@
8282
--minify-js \
8383
--minify-css \
8484
-o $out/index.html \
85-
./static/index.html
85+
./static/wasm.html
8686
8787
${pkgs.clean-css-cli}/bin/cleancss \
8888
-O2 \
@@ -92,17 +92,8 @@
9292
./static/material-icons.css \
9393
./static/app.css
9494
95-
${pkgs.closurecompiler}/bin/closure-compiler \
96-
--jscomp_off=checkVars \
97-
--compilation_level SIMPLE_OPTIMIZATIONS \
98-
--output_wrapper "%output%//# sourceMappingURL=all.js.map" \
99-
--create_source_map $out/all.js.map \
100-
--js ${./static/wasm.js} \
101-
--js ${./../miso-widgets/js/main.min.js} \
102-
--js ${./../miso-components/material-components-web.min.js} \
103-
--js ${./../miso-components/material-components-web-elm.min.js} \
104-
--js ${./static/app.js} \
105-
--js_output_file $out/all.js
95+
${pkgs.nodejs}/bin/npm i --prefer-offline
96+
${pkgs.nodejs}/bin/npm run build
10697
'';
10798
};
10899
app-release-apk = pkgs.writeShellApplication {

0 commit comments

Comments
 (0)