feat: add build commands to distribute over HTTP

This commit is contained in:
Andrew Rioux
2025-10-19 21:59:42 -04:00
parent e164ed9c12
commit 4430469cdc
5 changed files with 411 additions and 0 deletions
+25
View File
@@ -0,0 +1,25 @@
{ pkgs ? import <nixpkgs> { system = "x86_64-linux"; } }:
let
build-article = pkgs.writeShellApplication {
name = "build-article";
runtimeInputs = with pkgs; [ which texliveFull emacs git ];
text = builtins.readFile ./build/build-article.sh;
};
articles = pkgs.stdenv.mkDerivation {
name = "articles";
src = builtins.filterSource
(path: type: !(pkgs.lib.strings.hasPrefix "result" (baseNameOf path)))
./.;
buildInputs = with pkgs; [ emacs git build-article ];
buildPhase = ''
cp -a . $out
cd $out
find . -name '*.org' -exec build-article {} \;
'';
};
in {
inherit build-article articles;
default = articles;
}