summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLLLL Colonq <llll@colonq>2025-02-18 00:41:11 -0500
committerLLLL Colonq <llll@colonq>2025-02-18 00:41:11 -0500
commitefa2b345a14a6b34f51671fff715ccf5d6d15559 (patch)
tree20b7deaa20d52cf1417101bf65fa36ea00cf003f
parent5453326ffa7b59d5a414eb0b029667f3d9537793 (diff)
Actually what if we just included it in the API templates like we're
supposed to :3
-rw-r--r--Makefile47
-rw-r--r--flake.nix17
-rw-r--r--templates/api/throwshade.html (renamed from templates/throwshade/index.html)0
3 files changed, 11 insertions, 53 deletions
diff --git a/Makefile b/Makefile
index 9eeb0a8..b630ed3 100644
--- a/Makefile
+++ b/Makefile
@@ -4,9 +4,8 @@ TEMPLATES_API=$(shell ls templates/api)
TEMPLATES_PUBNIX=$(shell ls templates/pubnix)
TEMPLATES_AUTH=$(shell ls templates/auth)
TEMPLATES_GREENCIRCLE=$(shell ls templates/greencircle)
-TEMPLATES_THROWSHADE=$(shell ls templates/greencircle)
-all: api pubnix extension auth greencircle throwshade
+all: api pubnix extension auth greencircle
dist:
mkdir -p dist/api/test
@@ -17,16 +16,22 @@ dist:
mkdir -p dist/auth/deploy
mkdir -p dist/greencircle/test
mkdir -p dist/greencircle/deploy
- mkdir -p dist/throwshade/test
- mkdir -p dist/throwshade/deploy
main.js: $(shell find src)
purs-nix bundle
# api
-deploy_api: dist $(addprefix dist/api/deploy/,$(TEMPLATES_API)) dist/api/deploy/assets dist/api/deploy/main.js dist/api/deploy/main.css
+deploy_api: dist $(addprefix dist/api/deploy/,$(TEMPLATES_API)) dist/api/deploy/assets dist/api/deploy/main.js dist/api/deploy/main.css dist/api/deploy/newton
-api: dist $(addprefix dist/api/test/,$(TEMPLATES_API)) dist/api/test/assets dist/api/test/main.js dist/api/test/main.css
+api: dist $(addprefix dist/api/test/,$(TEMPLATES_API)) dist/api/test/assets dist/api/test/main.js dist/api/test/main.css dist/api/test/newton
+
+dist/api/%/newton: ${NEWTON_PATH}
+ rm -rf $@
+ mkdir -p $@
+ cp -r --no-preserve=mode,ownership $</snippets $@
+ install $</throwshade-*.js $@/throwshade.js
+ install $</throwshade-*.wasm $@/throwshade.wasm
+ chmod -R 0755 $@
dist/api/%/main.js: main.js dist
cp $< $@
@@ -112,36 +117,6 @@ dist/greencircle/%/$(template): config/%.m4 templates/greencircle/$(template)
endef
$(foreach template,$(TEMPLATES_GREENCIRCLE), $(eval $(GEN_RULE_GREENCIRCLE)))
-# throwshade
-deploy_throwshade: dist $(addprefix dist/throwshade/deploy/,$(TEMPLATES_THROWSHADE)) dist/throwshade/deploy/assets dist/throwshade/deploy/main.js dist/throwshade/deploy/main.css dist/throwshade/deploy/newton
-
-throwshade: dist $(addprefix dist/throwshade/test/,$(TEMPLATES_THROWSHADE)) dist/throwshade/test/assets dist/throwshade/test/main.js dist/throwshade/test/main.css dist/throwshade/test/newton
-
-dist/throwshade/%/newton: ${NEWTON_PATH}
- rm -rf $@
- mkdir -p $@
- cp -r --no-preserve=mode,ownership $</snippets $@
- install $</throwshade-*.js $@/throwshade.js
- install $</throwshade-*.wasm $@/throwshade.wasm
- chmod -R 0755 $@
-
-dist/throwshade/%/main.js: main.js dist
- cp $< $@
-
-dist/throwshade/%/main.css: main.css dist
- cp $< $@
-
-dist/throwshade/%/assets: $(shell find assets) dist
- rm -rf $@
- mkdir -p $@
- cp -r assets/* $@
-
-define GEN_RULE_THROWSHADE
-dist/throwshade/%/$(template): config/%.m4 templates/throwshade/$(template)
- sh -c "m4 $$^ >$$@"
-endef
-$(foreach template,$(TEMPLATES_THROWSHADE), $(eval $(GEN_RULE_THROWSHADE)))
-
# extension
extension: dist dist/extension/assets dist/extension/manifest.json dist/extension/background.js dist/extension/main.js dist/extension/main.css dist/extension/config.js
diff --git a/flake.nix b/flake.nix
index 67550c2..57669da 100644
--- a/flake.nix
+++ b/flake.nix
@@ -86,22 +86,6 @@
cp -r dist/greencircle/deploy/* $out/
'';
};
- bundleThrowshade = pkgs.stdenv.mkDerivation {
- name = "bundt-bundle-throwshade";
- src = ./.;
- inherit NEWTON_PATH;
- buildInputs = [
- (purescript.command {})
- pkgs.m4
- ];
- buildPhase = "
- make deploy_throwshade
- ";
- installPhase = ''
- mkdir -p $out
- cp -r dist/throwshade/deploy/* $out/
- '';
- };
in {
devShells.x86_64-linux.default = pkgs.mkShell {
inherit NEWTON_PATH;
@@ -122,7 +106,6 @@
bundleAPI
bundleAuth
bundleGreencircle
- bundleThrowshade
;
};
overlay = self: super: {
diff --git a/templates/throwshade/index.html b/templates/api/throwshade.html
index 2bf006a..2bf006a 100644
--- a/templates/throwshade/index.html
+++ b/templates/api/throwshade.html