Added python skeleton
This commit is contained in:
		
							parent
							
								
									74ddbc24bb
								
							
						
					
					
						commit
						47c7b69afa
					
				| @ -17,10 +17,12 @@ | ||||
|       url = "gitlab:doronbehar/nix-matlab"; | ||||
|       inputs.nixpkgs.follows = "nixpkgs"; | ||||
|     }; | ||||
|     flake-utils.url = "github:numtide/flake-utils"; | ||||
|   }; | ||||
| 
 | ||||
|   outputs = | ||||
|     { | ||||
|       self, | ||||
|       nixpkgs, | ||||
|       home-manager, | ||||
|       stylix, | ||||
| @ -67,6 +69,6 @@ | ||||
|           }; | ||||
|         }; | ||||
|       }; | ||||
|       devenv = ./shell-modules/default.nix; | ||||
|       lib = import ./shell-modules/default.nix self.inputs; | ||||
|     }; | ||||
| } | ||||
|  | ||||
| @ -1,35 +1,30 @@ | ||||
| { pkgs, ... }: | ||||
| { nixpkgs, flake-utils, ... }: | ||||
| 
 | ||||
| pkgs.mkShell { | ||||
|   packages = with pkgs; [ | ||||
|     (python312.withPackages (p: [ | ||||
|       p.numpy | ||||
|       p.scikit-learn | ||||
|       p.scipy | ||||
|       p.pandas | ||||
|       p.matplotlib | ||||
|       p.torch-bin | ||||
|       # p.torchvision | ||||
|     ])) | ||||
|     libffi | ||||
|     openssl | ||||
|     stdenv.cc.cc | ||||
|     linuxPackages.nvidia_x11 | ||||
|     binutils | ||||
|     cudatoolkit | ||||
|     libGLU | ||||
|     libGL | ||||
| let | ||||
|   imports = [ | ||||
|     ./languags/python.nix | ||||
|   ]; | ||||
|   LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath ( | ||||
|     with pkgs; | ||||
|     [ | ||||
|       stdenv.cc.cc | ||||
|       linuxPackages.nvidia_x11 | ||||
|       binutils | ||||
|       cudatoolkit | ||||
|       libGLU | ||||
|       libGL | ||||
|     ] | ||||
|   ); | ||||
|   CUDA_PATH = pkgs.cudatoolkit; | ||||
| in | ||||
| { | ||||
| 
 | ||||
|   mkShell = | ||||
|     attrs: | ||||
|     (flake-utils.lib.eachDefaultSystem ( | ||||
|       system: | ||||
|       let | ||||
|         pkgs = import nixpkgs { | ||||
|           inherit system; | ||||
|           config.allowUnfree = true; | ||||
|         }; | ||||
|         modules = [ | ||||
|           attrs | ||||
|         ] ++ imports; | ||||
|         evaluated = nixpkgs.lib.evalModules { inherit modules; }; | ||||
|       in | ||||
|       { | ||||
|         devShells.default = pkgs.mkShell { | ||||
|           TEST_ENV = builtins.trace evaluated.config "HELLO"; | ||||
|         }; | ||||
|       } | ||||
|     )); | ||||
| } | ||||
|  | ||||
							
								
								
									
										0
									
								
								shell-modules/languages/python.nix
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										0
									
								
								shell-modules/languages/python.nix
									
									
									
									
									
										Normal file
									
								
							
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Jan-Bulthuis
						Jan-Bulthuis