initial commit
This commit is contained in:
		
				commit
				
					
						c0343c15ae
					
				
			
		
					 9 changed files with 95 additions and 0 deletions
				
			
		
							
								
								
									
										0
									
								
								.envrc
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										0
									
								
								.envrc
									
										
									
									
									
										Normal file
									
								
							
							
								
								
									
										1
									
								
								.gitignore
									
										
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								.gitignore
									
										
									
									
										vendored
									
									
										Normal file
									
								
							|  | @ -0,0 +1 @@ | |||
| /target | ||||
							
								
								
									
										7
									
								
								Cargo.lock
									
										
									
										generated
									
									
									
										Normal file
									
								
							
							
						
						
									
										7
									
								
								Cargo.lock
									
										
									
										generated
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,7 @@ | |||
| # This file is automatically @generated by Cargo. | ||||
| # It is not intended for manual editing. | ||||
| version = 3 | ||||
| 
 | ||||
| [[package]] | ||||
| name = "frzn-challenge" | ||||
| version = "0.1.0" | ||||
							
								
								
									
										6
									
								
								Cargo.toml
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										6
									
								
								Cargo.toml
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,6 @@ | |||
| [package] | ||||
| name = "frzn-challenge" | ||||
| version = "0.1.0" | ||||
| edition = "2021" | ||||
| 
 | ||||
| [dependencies] | ||||
							
								
								
									
										8
									
								
								default.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										8
									
								
								default.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,8 @@ | |||
| {rustPlatform}: | ||||
| rustPlatform.buildRustPackage { | ||||
|   pname = "sample-rust"; | ||||
|   version = "0.0.1"; | ||||
| 
 | ||||
|   src = ./.; | ||||
|   cargoLock.lockFile = ./Cargo.lock; | ||||
| } | ||||
							
								
								
									
										26
									
								
								flake.lock
									
										
									
										generated
									
									
									
										Normal file
									
								
							
							
						
						
									
										26
									
								
								flake.lock
									
										
									
										generated
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,26 @@ | |||
| { | ||||
|   "nodes": { | ||||
|     "nixpkgs": { | ||||
|       "locked": { | ||||
|         "lastModified": 1733039856, | ||||
|         "narHash": "sha256-CAvvt3N7MWFlEpspYtfth5jWzbHQUAUOufOVXgm03rw=", | ||||
|         "owner": "NixOS", | ||||
|         "repo": "nixpkgs", | ||||
|         "rev": "0a644d62935fd8c0e6d9244c2ee2e8f6c2b6158c", | ||||
|         "type": "github" | ||||
|       }, | ||||
|       "original": { | ||||
|         "owner": "NixOS", | ||||
|         "repo": "nixpkgs", | ||||
|         "type": "github" | ||||
|       } | ||||
|     }, | ||||
|     "root": { | ||||
|       "inputs": { | ||||
|         "nixpkgs": "nixpkgs" | ||||
|       } | ||||
|     } | ||||
|   }, | ||||
|   "root": "root", | ||||
|   "version": 7 | ||||
| } | ||||
							
								
								
									
										24
									
								
								flake.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										24
									
								
								flake.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,24 @@ | |||
| { | ||||
|   description = "Rust Project Template"; | ||||
|   inputs.nixpkgs.url = "github:NixOS/nixpkgs"; | ||||
| 
 | ||||
|   outputs = { | ||||
|     self, | ||||
|     nixpkgs, | ||||
|   }: let | ||||
|     systems = ["x86_64-linux" "aarch64-linux"]; | ||||
|     forEachSystem = nixpkgs.lib.genAttrs systems; | ||||
| 
 | ||||
|     pkgsForEach = nixpkgs.legacyPackages; | ||||
|   in rec { | ||||
|     packages = forEachSystem (system: { | ||||
|       default = pkgsForEach.${system}.callPackage ./default.nix {}; | ||||
|     }); | ||||
| 
 | ||||
|     devShells = forEachSystem (system: { | ||||
|       default = pkgsForEach.${system}.callPackage ./shell.nix {}; | ||||
|     }); | ||||
| 
 | ||||
|     hydraJobs = packages; | ||||
|   }; | ||||
| } | ||||
							
								
								
									
										20
									
								
								shell.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										20
									
								
								shell.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,20 @@ | |||
| { | ||||
|   callPackage, | ||||
|   rust-analyzer, | ||||
|   rustfmt, | ||||
|   clippy, | ||||
|   cargo, | ||||
| }: let | ||||
|   mainPkg = callPackage ./default.nix {}; | ||||
| in | ||||
|   mainPkg.overrideAttrs (oa: { | ||||
|     nativeBuildInputs = | ||||
|       [ | ||||
|         # Additional rust tooling | ||||
|         rust-analyzer | ||||
|         rustfmt | ||||
|         clippy | ||||
|         cargo | ||||
|       ] | ||||
|       ++ (oa.nativeBuildInputs or []); | ||||
|   }) | ||||
							
								
								
									
										3
									
								
								src/main.rs
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										3
									
								
								src/main.rs
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,3 @@ | |||
| fn main() { | ||||
|     println!("Hello, world!"); | ||||
| } | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue