website/default.nix
Andrew Rioux 0e526907e9
Some checks failed
Deploy Website / build-and-deploy (push) Failing after 12s
feat: add CI/CD to automatically deploy
2025-10-19 23:45:36 -04:00

23 lines
662 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;
};
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; }