Archived
Template
1
0

flake: improve checking whether thesis type is set

This commit is contained in:
surtur 2022-11-13 14:42:05 +01:00
parent 36ad5c4a39
commit 4c2786df8a
Signed by: wanderer
SSH Key Fingerprint: SHA256:MdCZyJ2sHLltrLBp0xQO0O1qTW9BT/xl5nXkDvhlMCI

@ -17,8 +17,15 @@
supportedSystems = ["aarch64-linux" "x86_64-linux" "x86_64-darwin"];
forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
thesisType = ""; # ms, bc
throw "Set thesis type!"
# ms, bc
thesis = "";
checkThesisType = {type}:
if builtins.stringLength type == 0
then "unknown"
else type;
thesisType = checkThesisType {type = thesis;};
documentName = "thesis";
pname = thesisType + "_" + documentName;
version = "0.0.1";