Files
website/default.nix
T
Andrew Rioux 47226ecad4
Deploy Website / build-and-deploy (push) Failing after 6m19s
feat: add index.html to send people to
2026-05-30 22:32:40 -04:00

31 lines
879 B
Nix

{ 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;
};
build-index = pkgs.writeShellApplication {
name = "build-index";
text = builtins.readFile ./build/build-index.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 build-index ];
buildPhase = ''
cp -a . $out
cd $out
mv index.html index.html.in
find . -name 'articles/*.org' -exec build-article {} \;
build-index > index.html
'';
};
in { inherit build-article articles; }