Add Python Notebook flake
This commit is contained in:
		
							parent
							
								
									8343382cbc
								
							
						
					
					
						commit
						203f0ff268
					
				
					 1 changed files with 31 additions and 0 deletions
				
			
		
							
								
								
									
										31
									
								
								notebook/python/flake.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										31
									
								
								notebook/python/flake.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,31 @@ | |||
| { | ||||
|     description = "Jupyter notebook flake"; | ||||
| 
 | ||||
|     inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-22.11"; | ||||
|     inputs.flake-utils.url = "github:numtide/flake-utils"; | ||||
| 
 | ||||
|     outputs = { self, nixpkgs, flake-utils}: | ||||
|         flake-utils.lib.eachDefaultSystem (system: | ||||
|             let | ||||
|                 pkgs = import nixpkgs { | ||||
|                     inherit system; | ||||
|                 }; | ||||
|                 python-packages = p: with p; [ | ||||
|                     imageio | ||||
|                     jupyter | ||||
|                     matplotlib | ||||
|                     notebook | ||||
|                     numpy | ||||
|                 ]; | ||||
|             in { | ||||
|                 devShells.default = pkgs.mkShell { | ||||
|                     buildInputs = with pkgs; [ | ||||
|                         (python3.withPackages python-packages) | ||||
|                     ]; | ||||
|                     shellHook = '' | ||||
|                         jupyter notebook ./CIEColorSpaces.ipynb && exit | ||||
|                     ''; | ||||
|                 }; | ||||
|             } | ||||
|         ); | ||||
| } | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue