summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--flake.nix24
1 files changed, 11 insertions, 13 deletions
diff --git a/flake.nix b/flake.nix
index 4c7164b..cd54fff 100644
--- a/flake.nix
+++ b/flake.nix
@@ -56,23 +56,21 @@
56 }; 56 };
57 57
58 packages = rec { 58 packages = rec {
59 website-public = compileQuarto "STRIP_SOLUTIONS=1";
60 website-private = compileQuarto "";
61 website = runCommand "website-combined" { } ''
62 mkdir -p "$out"
63 cp -r "${website-public}"/* "$out/"
64 mkdir -p "$out/${solutionsSecret}"
65 cp -r "${website-private}"/* "$out/${solutionsSecret}"
66 '';
67
68 pdf-slides = compilePandoc ./lectures "beamer" ""; 59 pdf-slides = compilePandoc ./lectures "beamer" "";
69 pdf-exercises = compilePandoc ./exercises "pdf" "STRIP_SOLUTIONS=1"; 60 pdf-exercises = compilePandoc ./exercises "pdf" "STRIP_SOLUTIONS=1";
70 pdf-solutions = compilePandoc ./exercises "pdf" ""; 61 pdf-solutions = compilePandoc ./exercises "pdf" "";
71 pdf = runCommand "pdf-combined" { } '' 62
63 website-public = compileQuarto "STRIP_SOLUTIONS=1";
64 website-private = compileQuarto "";
65
66 # Everything combined
67 default = runCommand "combined" { } ''
72 mkdir -p "$out" 68 mkdir -p "$out"
73 ln -s ${pdf-slides} "$out/slides" 69 cp -Lr ${pdf-slides} "$out/slides"
74 ln -s ${pdf-exercises} "$out/exercises" 70 cp -Lr ${pdf-exercises} "$out/exercises"
75 ln -s ${pdf-solutions} "$out/solutions" 71 cp -Lr ${pdf-solutions} "$out/solutions"
72 cp -Lr ${website-public} "$out/website" --no-preserve=mode
73 cp -Lr ${website-private} "$out/website/${solutionsSecret}"
76 ''; 74 '';
77 }; 75 };
78 76