build with flake
This commit is contained in:
		
							
								
								
									
										1
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										1
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							| @@ -1,3 +1,4 @@ | ||||
| /target | ||||
| .envrc | ||||
| .direnv | ||||
| /result | ||||
|   | ||||
							
								
								
									
										24
									
								
								flake.nix
									
									
									
									
									
								
							
							
						
						
									
										24
									
								
								flake.nix
									
									
									
									
									
								
							| @@ -6,7 +6,6 @@ | ||||
|       url = "github:oxalica/rust-overlay"; | ||||
|       inputs = { | ||||
|         nixpkgs.follows = "nixpkgs"; | ||||
|         flake-utils.follows = "flake-utils"; | ||||
|       }; | ||||
|     }; | ||||
|   }; | ||||
| @@ -14,6 +13,9 @@ | ||||
|     flake-utils.lib.eachDefaultSystem | ||||
|       (system: | ||||
|         let | ||||
|           pname = "vikunja-gatherer"; | ||||
|           version = "0.1.0"; | ||||
|           src = ./.; | ||||
|           overlays = [ (import rust-overlay) ]; | ||||
|           pkgs = import nixpkgs { | ||||
|             inherit system overlays; | ||||
| @@ -23,11 +25,21 @@ | ||||
|         with pkgs; | ||||
|         { | ||||
|           devShells.default = mkShell { | ||||
|             # 👇 we can just use `rustToolchain` here: | ||||
|             buildInputs = [ | ||||
|               rustToolchain | ||||
|               openssl | ||||
|             ]; | ||||
|             nativeBuildInputs = [ rustToolchain pkg-config ]; | ||||
|  | ||||
|             buildInputs = [ openssl ]; | ||||
|           }; | ||||
|  | ||||
|           packages.default = rustPlatform.buildRustPackage { | ||||
|             inherit src pname version; | ||||
|  | ||||
|             cargoLock = { | ||||
|               lockFile = ./Cargo.lock; | ||||
|             }; | ||||
|  | ||||
|             nativeBuildInputs = [ rustToolchain pkg-config ]; | ||||
|  | ||||
|             buildInputs = [ openssl ]; | ||||
|           }; | ||||
|         } | ||||
|       ); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user