| 
									
										
										
										
											2018-10-30 16:36:21 +01:00
										 |  |  | { stdenv, fetchFromGitHub, rustPlatform, dbus, gmp, openssl, pkgconfig | 
					
						
							|  |  |  | , darwin }: | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | let | 
					
						
							|  |  |  |   inherit (darwin.apple_sdk.frameworks) Security; | 
					
						
							|  |  |  | in rustPlatform.buildRustPackage rec { | 
					
						
							| 
									
										
										
										
											2019-08-30 20:59:44 +02:00
										 |  |  |   name = "maturin-${version}"; | 
					
						
							| 
									
										
										
										
											2019-10-02 09:04:51 +02:00
										 |  |  |   version = "0.7.6"; | 
					
						
							| 
									
										
										
										
											2018-10-30 16:36:21 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  |   src = fetchFromGitHub { | 
					
						
							|  |  |  |     owner = "PyO3"; | 
					
						
							| 
									
										
										
										
											2019-08-30 20:59:44 +02:00
										 |  |  |     repo = "maturin"; | 
					
						
							| 
									
										
										
										
											2018-10-30 16:36:21 +01:00
										 |  |  |     rev = "v${version}"; | 
					
						
							| 
									
										
										
										
											2019-10-02 09:04:51 +02:00
										 |  |  |     sha256 = "1siqd8k6grlbj9n1a75jq8px1pzvzpr2ph689g53rjngf1k44zqk"; | 
					
						
							| 
									
										
										
										
											2018-10-30 16:36:21 +01:00
										 |  |  |   }; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-02-16 16:23:11 -05:00
										 |  |  |   cargoSha256 = "10x8kr4qxvvmzpr1n41ybsb6rnii2qz5bdhnk0zpfnr2n9215p8s"; | 
					
						
							| 
									
										
										
										
											2018-10-30 16:36:21 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  |   nativeBuildInputs = [ pkgconfig ]; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   buildInputs = [ gmp openssl ] | 
					
						
							|  |  |  |     ++ stdenv.lib.optional stdenv.isDarwin Security | 
					
						
							|  |  |  |     ++ stdenv.lib.optional stdenv.isLinux dbus; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   # Requires network access, fails in sandbox. | 
					
						
							|  |  |  |   doCheck = false; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   meta = with stdenv.lib; { | 
					
						
							|  |  |  |     description = "Build and publish crates with pyo3 bindings as python packages"; | 
					
						
							| 
									
										
										
										
											2019-08-30 20:59:44 +02:00
										 |  |  |     homepage = https://github.com/PyO3/maturin; | 
					
						
							| 
									
										
										
										
											2018-10-30 16:36:21 +01:00
										 |  |  |     license = licenses.mit; | 
					
						
							|  |  |  |     maintainers = [ maintainers.danieldk ]; | 
					
						
							|  |  |  |     platforms = platforms.all; | 
					
						
							|  |  |  |   }; | 
					
						
							|  |  |  | } |