Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
zeme-wana committed Aug 18, 2023
1 parent b3ff6a1 commit 752d3ad
Show file tree
Hide file tree
Showing 10 changed files with 34 additions and 45 deletions.
31 changes: 7 additions & 24 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@
inputs = {

iogx.url = "github:input-output-hk/iogx";
iogx.inputs.nixpkgs.follows = "nixpkgs";

nixpkgs.url = "github:NixOS/nixpkgs/9952d6bc395f5841262b006fbace8dd7e143b634";

n2c.url = "github:nlewo/nix2container";

Expand Down
5 changes: 5 additions & 0 deletions nix/marlowe-playground/easy-purescript-nix.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{ inputs, system, ... }:
let
easy-purescript-nix = import inputs.iogx.inputs.easy-purescript-nix {};
in
easy-purescript-nix // { purs = easy-purescript-nix.purs-0_15_2; }
2 changes: 1 addition & 1 deletion nix/marlowe-playground/generated-purescript.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ pkgs.runCommand "generated-purescript" { } ''
cp ${builtins.path { name = "tidyrc.json"; path = inputs'.self + "/.tidyrc.json"; } } $out/.tidyrc.json
cp ${builtins.path { name = "tidyoperators"; path = inputs'.self + "/.tidyoperators"; } } $out/.tidyoperators
cd $out
${inputs'.iogx.inputs.easy-purescript-nix.purs-tidy}/bin/purs-tidy format-in-place *
${nix.marlowe-playground.easy-purescript-nix.purs-tidy}/bin/purs-tidy format-in-place *
${pkgs.nodePackages.prettier}/bin/prettier -w .
rm -f $out/.tidyrc.json
rm -f $out/.tidyoperators
Expand Down
4 changes: 2 additions & 2 deletions nix/marlowe-playground/marlowe-playground-client.nix
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ npmlock2nix.v1.build {
spagoPkgs.installSpagoStyle
spagoPkgs.buildSpagoStyle
pkgs.nodejs_14x.pkgs.npm
nix.marlowe-cardano.purescript.spago2nix
nix.marlowe-cardano.purescript.purs
nix.marlowe-playground.easy-purescript-nix.purs
nix.marlowe-playground.easy-purescript-nix.spago2nix
];
unpackPhase = ''
mkdir -p marlowe-playground-client
Expand Down
2 changes: 1 addition & 1 deletion nix/marlowe-playground/oci-images.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ let
mkStandardOCI {
inherit name;
# meta.tags = [ "latest" ];
operable = inputs.self'.operables.${name};
operable = inputs'.self.operables.${name};
uid = "0";
gid = "0";
labels = {
Expand Down
2 changes: 1 addition & 1 deletion nix/marlowe-playground/operables.nix
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ in
'';
};
marlowe-playground-server = mkOperable {
package = inputs.self'.packages.marlowe-playground-server;
package = inputs'.self.packages.marlowe-playground-server;
runtimeInputs = [ ghc-with-marlowe coreutils cacert z3 ];
runtimeScript = ''
#################
Expand Down
2 changes: 1 addition & 1 deletion nix/marlowe-playground/scripts.nix
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
cd marlowe-playground-client
${inputs'.iogx.inputs.easy-purescript-nix.spago2nix}/bin/spago2nix generate
${nix.marlowe-playground.easy-purescript-nix.spago2nix}/bin/spago2nix generate
'';

}
7 changes: 4 additions & 3 deletions nix/per-system-outputs.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This file is part of the IOGX template and is documented at the link below:
# https://www.github.com/input-output-hk/iogx#35-nixper-system-outputsnix

{ nix, projects, ... }:
{ nix, inputs', inputs, projects, ... }:

{
packages.generated-purescript = nix.marlowe-playground.generated-purescript;
Expand All @@ -10,7 +10,8 @@

packages.playwright = nix.marlowe-playground.playwright;

operables = nix.marlowe-cardano.operables projects.default;
operables = nix.marlowe-playground.operables projects.default;

oci-images = nix.marlowe-playground.oci-images;

oci-images = nix.marlowe-cardano.oci-images;
}
21 changes: 12 additions & 9 deletions nix/shell.nix
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
# This file is part of the IOGX template and is documented at the link below:
# https://www.github.com/input-output-hk/iogx#34-nixshellnix

{ nix, inputs', pkgs, ... }:
{ nix, inputs', pkgs, system, l, ... }:

{
name = "marlowe-playground";


env = {
PLAYWRIGHT_BROWSERS_PATH = "${nix.marlowe-playground.playwright}";
PLAYWRIGHT_BROWSERS_PATH =
l.optionalString (system == "x86_64-linux")
"${nix.marlowe-playground.playwright}";

PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD = "true";
};

Expand All @@ -33,13 +36,13 @@


packages = [
inputs'.iogx.inputs.easy-purescript-nix.purs-tidy
inputs'.iogx.inputs.easy-purescript-nix.purs
inputs'.iogx.inputs.easy-purescript-nix.spago
inputs'.iogx.inputs.easy-purescript-nix.spago2nix
inputs'.iogx.inputs.easy-purescript-nix.psa
inputs'.iogx.inputs.easy-purescript-nix.purescript-language-server
inputs'.iogx.inputs.easy-purescript-nix.pscid
nix.marlowe-playground.easy-purescript-nix.purs-tidy
nix.marlowe-playground.easy-purescript-nix.purs
nix.marlowe-playground.easy-purescript-nix.spago
nix.marlowe-playground.easy-purescript-nix.spago2nix
nix.marlowe-playground.easy-purescript-nix.psa
nix.marlowe-playground.easy-purescript-nix.purescript-language-server
nix.marlowe-playground.easy-purescript-nix.pscid

pkgs.jq
pkgs.yq
Expand Down

0 comments on commit 752d3ad

Please sign in to comment.