aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXe Iaso <me@christine.website>2022-12-09 00:19:06 -0500
committerXe Iaso <me@christine.website>2022-12-09 00:19:06 -0500
commit184a38e61d5336b741cff09b16af4497ac5614f4 (patch)
treee10b416187cec775e55ce0f96cd693ffc391fd99
parente8d057aae475e4b2d1f078db0bf3d9f3b135f222 (diff)
downloadxesite-184a38e61d5336b741cff09b16af4497ac5614f4.tar.xz
xesite-184a38e61d5336b741cff09b16af4497ac5614f4.zip
flake: make frontend packages a metapackage
Signed-off-by: Xe Iaso <me@christine.website>
-rw-r--r--flake.nix31
1 files changed, 19 insertions, 12 deletions
diff --git a/flake.nix b/flake.nix
index 533d245..beace4f 100644
--- a/flake.nix
+++ b/flake.nix
@@ -87,18 +87,25 @@
'';
};
- frontend.share-button = pkgs.deno2nix.mkBundled {
- pname = "xesite-frontend-mastodon-share-button";
- inherit (bin) version;
-
- src = ./src/frontend;
- lockfile = ./src/frontend/lock.json;
+ frontend = rec {
+ share-button = pkgs.deno2nix.mkBundled {
+ pname = "xesite-frontend-mastodon-share-button";
+ inherit (bin) version;
+
+ src = ./src/frontend;
+ lockfile = ./src/frontend/lock.json;
+
+ output = "mastodon_share_button.js";
+ outPath = "static/js";
+ entrypoint = "./mastodon_share_button.tsx";
+ importMap = "./import_map.json";
+ minify = true;
+ };
- output = "mastodon_share_button.js";
- outPath = "static/js";
- entrypoint = "./mastodon_share_button.tsx";
- importMap = "./import_map.json";
- minify = true;
+ all = pkgs.symlinkJoin {
+ name = "xesite-frontend-${bin.version}";
+ paths = [ share-button ];
+ };
};
static = pkgs.stdenv.mkDerivation {
@@ -133,7 +140,7 @@
default = pkgs.symlinkJoin {
name = "xesite-${bin.version}";
- paths = [ config posts static bin frontend.share-button resumePDF ];
+ paths = [ config posts static bin frontend.all resumePDF ];
};
docker = pkgs.dockerTools.buildLayeredImage {