|
150 | 150 |
|
151 | 151 | lbfHaskell = import ./extras/lbf-haskell.nix clis.lbf clis.lbg-haskell; |
152 | 152 | lbfPurescript = import ./extras/lbf-purescript.nix clis.lbf clis.lbg-purescript; |
| 153 | + lbfHaskellPlutus = import ./extras/lbf-haskell-plutus.nix clis.lbf clis.lbg-haskell; |
| 154 | + lbfPurescriptPlutus = import ./extras/lbf-purescript-plutus.nix clis.lbf clis.lbg-purescript; |
153 | 155 | pursFlake = import ./extras/flake-purescript.nix; |
154 | 156 |
|
155 | 157 | # Runtimes |
|
175 | 177 |
|
176 | 178 | ## Plutus runtime - lbr-plutus |
177 | 179 |
|
| 180 | + ### Haskell |
178 | 181 | lbrPlutusHsBuild = buildAbstraction { |
179 | 182 | import-location = ./runtimes/haskell/lbr-plutus/build.nix; |
180 | 183 | additional = { lbr-prelude = ./runtimes/haskell/lbr-prelude; }; |
181 | 184 | }; |
182 | 185 | lbrPlutusHsFlake = flakeAbstraction lbrPlutusHsBuild; |
183 | 186 |
|
| 187 | + ### Purescript |
| 188 | + |
| 189 | + lbrPlutusPurs = pursFlake ( |
| 190 | + import ./runtimes/purescript/lbr-plutus/build.nix { |
| 191 | + inherit pkgs commonTools; |
| 192 | + shellHook = config.pre-commit.installationScript; |
| 193 | + } |
| 194 | + ); |
| 195 | + |
184 | 196 | # Schema libs |
185 | 197 |
|
186 | 198 | lbfLibs = { |
|
209 | 221 | dependencies = [ "lbr-plutus" "lbf-prelude" "lbr-prelude" ]; |
210 | 222 | }; |
211 | 223 |
|
212 | | - # TODO |
213 | | - # lbf-plutus-purs = lbfPurescript { |
214 | | - # inherit pkgs; |
215 | | - # name = "lbf-plutus"; |
216 | | - # src = ./libs/lbf-plutus; |
217 | | - # imports = [ ./libs/lbf-prelude ]; |
218 | | - # files = [ "Plutus/V1.lbf" "Plutus/V2.lbf" ]; |
219 | | - # dependencies = [ "lbr-plutus" "lbf-prelude" "lbr-prelude" ]; |
220 | | - # }; |
| 224 | + lbf-plutus-purs = lbfPurescript { |
| 225 | + inherit pkgs; |
| 226 | + name = "lbf-plutus"; |
| 227 | + src = ./libs/lbf-plutus; |
| 228 | + imports = [ ./libs/lbf-prelude ]; |
| 229 | + files = [ "Plutus/V1.lbf" "Plutus/V2.lbf" ]; |
| 230 | + dependencies = [ "lbr-plutus" "lbf-prelude" "lbr-prelude" ]; |
| 231 | + }; |
221 | 232 | }; |
222 | 233 |
|
223 | 234 | # Test Suites |
|
239 | 250 |
|
240 | 251 | ### Purescript |
241 | 252 |
|
| 253 | + lbrPurs = { |
| 254 | + lbr-prelude-purs = pkgs.stdenv.mkDerivation { |
| 255 | + name = "lbr-prelude"; |
| 256 | + src = ./runtimes/purescript/lbr-prelude; |
| 257 | + phases = "installPhase"; |
| 258 | + installPhase = "ln -s $src $out"; |
| 259 | + }; |
| 260 | + lbr-plutus-purs = pkgs.stdenv.mkDerivation { |
| 261 | + name = "lbr-plutus"; |
| 262 | + src = ./runtimes/purescript/lbr-plutus; |
| 263 | + phases = "installPhase"; |
| 264 | + installPhase = "ln -s $src $out"; |
| 265 | + }; |
| 266 | + |
| 267 | + }; |
242 | 268 | lbtPreludePursFlake = pursFlake ( |
243 | 269 | import ./testsuites/lbt-prelude/lbt-prelude-purescript/build.nix { |
244 | 270 | inherit pkgs commonTools shellHook lbfPurescript; |
245 | | - lbr-prelude-purs = pkgs.stdenv.mkDerivation { name = "lbr-prelude"; src = ./runtimes/purescript/lbr-prelude; phases = "installPhase"; installPhase = "ln -s $src $out"; }; |
| 271 | + inherit (lbrPurs) lbr-prelude-purs; |
246 | 272 | inherit (lbfLibs) lbf-prelude-purs; |
247 | 273 | } |
248 | 274 | ); |
249 | 275 |
|
250 | 276 | ## Plutus test suite - lbt-plutus |
251 | 277 |
|
| 278 | + ### Haskell |
| 279 | + |
252 | 280 | lbtPlutusHsBuild = buildAbstraction { |
253 | 281 | import-location = ./testsuites/lbt-plutus/lbt-plutus-haskell/build.nix; |
254 | 282 | additional = { |
255 | | - inherit lbfHaskell; |
| 283 | + inherit lbfHaskellPlutus; |
256 | 284 | lbf-prelude = ./libs/lbf-prelude; |
257 | 285 | lbr-prelude-hs = ./runtimes/haskell/lbr-prelude; |
258 | 286 | lbf-plutus = ./libs/lbf-plutus; |
|
262 | 290 | }; |
263 | 291 | lbtPlutusHsFlake = flakeAbstraction lbtPlutusHsBuild; |
264 | 292 |
|
| 293 | + ### Purescript |
| 294 | + |
| 295 | + lbtPlutusPursFlake = pursFlake ( |
| 296 | + import ./testsuites/lbt-plutus/lbt-plutus-purescript/build.nix { |
| 297 | + inherit pkgs commonTools shellHook lbfPurescriptPlutus; |
| 298 | + inherit (lbrPurs) lbr-prelude-purs lbr-plutus-purs; |
| 299 | + inherit (lbfLibs) lbf-prelude-purs lbf-plutus-purs; |
| 300 | + } |
| 301 | + ); |
| 302 | + |
265 | 303 | # Utilities |
266 | 304 | renameAttrs = rnFn: pkgs.lib.attrsets.mapAttrs' (n: value: { name = rnFn n; inherit value; }); |
267 | 305 | in |
|
277 | 315 | // lbrPreludeHsFlake.packages |
278 | 316 | // lbrPreludePurs.packages |
279 | 317 | // lbrPlutusHsFlake.packages |
| 318 | + // lbrPlutusPurs.packages |
280 | 319 | // lbtPreludeHsFlake.packages |
281 | 320 | // lbtPreludePursFlake.packages |
282 | 321 | // lbtPlutusHsFlake.packages |
| 322 | + // lbtPlutusPursFlake.packages |
283 | 323 | // clis |
284 | 324 | // lbfLibs; |
285 | 325 |
|
|
293 | 333 | dev-lbr-prelude-haskell = lbrPreludeHsFlake.devShell; |
294 | 334 | dev-lbr-prelude-purescript = lbrPreludePurs.devShell; |
295 | 335 | dev-lbr-plutus-haskell = lbrPlutusHsFlake.devShell; |
| 336 | + dev-lbr-plutus-purescript = lbrPlutusPurs.devShell; |
296 | 337 | dev-lbt-prelude-haskell = lbtPreludeHsFlake.devShell; |
297 | 338 | dev-lbt-prelude-purescript = lbtPreludePursFlake.devShell; |
298 | 339 | dev-lbt-plutus-haskell = lbtPlutusHsFlake.devShell; |
| 340 | + dev-lbt-plutus-purescript = lbtPlutusPursFlake.devShell; |
299 | 341 | lb = lbEnv; |
300 | 342 | }; |
301 | 343 |
|
302 | 344 | # nix flake check |
303 | 345 | checks = devShells // |
304 | 346 | packages // |
305 | 347 | lbrPreludePurs.checks // |
| 348 | + lbrPlutusPurs.checks // |
306 | 349 | lbtPreludePursFlake.checks // |
| 350 | + lbtPlutusPursFlake.checks // |
307 | 351 | renameAttrs (n: "check-${n}") ( |
308 | 352 | compilerFlake.checks // |
309 | 353 | frontendFlake.checks // |
|
0 commit comments