summaryrefslogtreecommitdiff
path: root/make.nix
diff options
context:
space:
mode:
authorquentin@aristote.fr <quentin@aristote.fr>2025-02-16 23:55:26 +0100
committerquentin@aristote.fr <quentin@aristote.fr>2025-02-22 21:14:40 +0100
commitf9e2ddae012c56c2690f6fc99627a7996dccee6f (patch)
tree2028e0abc072f85e00748841bb1fdb8e400536d2 /make.nix
parentaf3f5ba54e4c044316d6cceb1564abc318aa80c0 (diff)
move building inside package
Diffstat (limited to 'make.nix')
-rw-r--r--make.nix21
1 files changed, 21 insertions, 0 deletions
diff --git a/make.nix b/make.nix
new file mode 100644
index 0000000..d19b7ad
--- /dev/null
+++ b/make.nix
@@ -0,0 +1,21 @@
+{
+ pkgs,
+ dataSrc,
+}: let
+ html = (import ./lib {inherit (pkgs) lib;}).pp.html;
+ data = import dataSrc {
+ inherit pkgs;
+ markup = html;
+ };
+ commonArgs = {
+ inherit data make;
+ inherit (pkgs) lib;
+ inherit html;
+ };
+ make = path: overrides: let
+ f = import path;
+ in
+ f ((builtins.intersectAttrs (builtins.functionArgs f) commonArgs)
+ // overrides);
+in
+ make