| 
									
										
										
										
											2025-01-30 19:05:44 +01:00
										 |  |  | { | 
					
						
							|  |  |  |   lib, | 
					
						
							|  |  |  |   config, | 
					
						
							|  |  |  |   pkgs, | 
					
						
							|  |  |  |   ... | 
					
						
							|  |  |  | }: | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | with lib; | 
					
						
							|  |  |  | let | 
					
						
							|  |  |  |   cfg = config.modules.mathematica; | 
					
						
							| 
									
										
										
										
											2025-02-12 04:06:53 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  |   my-mathematica = pkgs.mathematica.override { | 
					
						
							|  |  |  |     # TODO: Just use a generic name for the installer? | 
					
						
							|  |  |  |     source = ./Wolfram_14.1.0_LIN_Bndl.sh; | 
					
						
							|  |  |  |   }; | 
					
						
							| 
									
										
										
										
											2025-01-30 19:05:44 +01:00
										 |  |  | in | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  |   options.modules.mathematica = { | 
					
						
							|  |  |  |     enable = mkEnableOption "mathematica"; | 
					
						
							|  |  |  |   }; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   config = mkIf cfg.enable { | 
					
						
							| 
									
										
										
										
											2025-01-30 19:06:49 +01:00
										 |  |  |     modules.unfree.allowedPackages = [ | 
					
						
							|  |  |  |       "mathematica" | 
					
						
							|  |  |  |     ]; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2025-02-12 04:06:53 +01:00
										 |  |  |     home.packages = [ | 
					
						
							|  |  |  |       my-mathematica | 
					
						
							| 
									
										
										
										
											2025-01-30 19:05:44 +01:00
										 |  |  |     ]; | 
					
						
							|  |  |  |   }; | 
					
						
							|  |  |  | } |