Skip to content

Commit a660dbd

Browse files
committed
Update template; Add ctl-scaffold-purs-project package to nix flake
1 parent cf1e0b4 commit a660dbd

File tree

6 files changed

+30
-15
lines changed

6 files changed

+30
-15
lines changed

flake.nix

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,10 @@
132132
);
133133
};
134134
ogmiosFixtures = buildOgmiosFixtures pkgs;
135+
exportOgmiosFixtures =
136+
''
137+
export OGMIOS_FIXTURES="${ogmiosFixtures}"
138+
'';
135139
project = pkgs.purescriptProject {
136140
inherit src pkgs projectName;
137141
packageJson = ./package.json;
@@ -152,15 +156,24 @@
152156
];
153157
};
154158
};
155-
exportOgmiosFixtures =
156-
''
157-
export OGMIOS_FIXTURES="${ogmiosFixtures}"
158-
'';
159+
ctlScaffoldProject = pkgs.purescriptProject rec {
160+
inherit pkgs;
161+
projectName = "ctl-scaffold";
162+
packageJson = ./templates/ctl-scaffold/package.json;
163+
packageLock = ./templates/ctl-scaffold/package-lock.json;
164+
src = builtins.path {
165+
path = ./templates/ctl-scaffold;
166+
name = "${projectName}-src";
167+
filter = path: ftype: !(pkgs.lib.hasSuffix ".md" path);
168+
};
169+
};
159170
in
160171
rec {
161172
packages = {
162173
ctl-purs-project = project.buildPursProject { };
163174

175+
ctl-scaffold-purs-project = ctlScaffoldProject.buildPursProject { };
176+
164177
ctl-example-bundle-web-esbuild = project.bundlePursProjectEsbuild {
165178
main = "Ctl.Examples.ByUrl";
166179
};

templates/ctl-scaffold/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
SHELL := bash
22
.ONESHELL:
3-
.PHONY: esbuild-bundle esbuild-serve webpack-bundle webpack-serve check-format format query-testnet-tip clean check-explicit-exports spago-build create-bundle-entrypoint create-html-entrypoint delete-bundle-entrypoint
3+
.PHONY: esbuild-bundle esbuild-serve webpack-bundle webpack-serve check-format format query-testnet-tip clean check-explicit-exports build create-bundle-entrypoint create-html-entrypoint delete-bundle-entrypoint
44
.SHELLFLAGS := -eu -o pipefail -c
55

66
ps-sources := $(shell fd --no-ignore-parent -epurs)
@@ -21,7 +21,7 @@ preview-node-ipc = $(shell docker volume inspect store_node-preview-ipc | jq -r
2121
preprod-node-ipc = $(shell docker volume inspect store_node-preprod-ipc | jq -r '.[0].Mountpoint')
2222
serve-port := 4008
2323

24-
spago-build:
24+
build:
2525
@spago build
2626

2727
create-bundle-entrypoint:

templates/ctl-scaffold/flake.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
type = "github";
1717
owner = "Plutonomicon";
1818
repo = "cardano-transaction-lib";
19-
rev = "91a0559ad015ee937c5750e80de98283ed15f616";
19+
rev = "cf1e0b4785a2858cf1f3e51b02f6de8fd0aab4a2";
2020
};
2121
# To use the same version of `nixpkgs` as we do
2222
nixpkgs.follows = "ctl/nixpkgs";

templates/ctl-scaffold/packages.dhall

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ let additions =
114114
, "web-storage"
115115
]
116116
, repo = "https://github.com/Plutonomicon/cardano-transaction-lib.git"
117-
, version = "91a0559ad015ee937c5750e80de98283ed15f616"
117+
, version = "cf1e0b4785a2858cf1f3e51b02f6de8fd0aab4a2"
118118
}
119119
}
120120

templates/ctl-scaffold/spago-packages.nix

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

templates/ctl-scaffold/spago.dhall

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,21 @@ You can edit this file as you like.
55
{ name = "ctl-package-example"
66
, dependencies =
77
[ "aff"
8+
, "bifunctors"
89
, "bytearrays"
9-
, "cardano-hd-wallet"
10-
, "cardano-plutus-data-schema"
1110
, "cardano-collateral-select"
11+
, "cardano-hd-wallet"
1212
, "cardano-key-wallet"
1313
, "cardano-message-signing"
14-
, "cip30-mock"
15-
, "uplc-apply-args"
14+
, "cardano-plutus-data-schema"
1615
, "cardano-serialization-lib"
1716
, "cardano-transaction-builder"
1817
, "cardano-transaction-lib"
1918
, "cardano-types"
19+
, "cip30-mock"
2020
, "datetime"
2121
, "effect"
22+
, "exceptions"
2223
, "js-bigints"
2324
, "maybe"
2425
, "mote"
@@ -30,6 +31,7 @@ You can edit this file as you like.
3031
, "prelude"
3132
, "safely"
3233
, "spec"
34+
, "uplc-apply-args"
3335
]
3436
, packages = ./packages.dhall
3537
, sources = [ "src/**/*.purs", "exe/**/*.purs", "test/**/*.purs" ]

0 commit comments

Comments
 (0)