Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at 21.05 48 lines 1.0 kB view raw
1{ lib 2, buildPythonPackage 3, fetchFromGitHub 4, pythonOlder 5, setuptools-rust 6, rustPlatform 7, pytestCheckHook 8}: 9 10buildPythonPackage rec { 11 pname = "rtoml"; 12 version = "0.6.1"; 13 disabled = pythonOlder "3.7"; 14 15 src = fetchFromGitHub { 16 owner = "samuelcolvin"; 17 repo = pname; 18 rev = "v${version}"; 19 sha256 = "07bf30if1wmbqjp5n4ib43n6frx8ybyxc9fndxncq7aylkrhd7hy"; 20 }; 21 22 cargoDeps = rustPlatform.fetchCargoTarball { 23 inherit src; 24 name = "${pname}-${version}"; 25 sha256 = "1q082sdac5vm4l3b45rfjp4vppp9y9qhagdjqqfdz8gdhm1k8yyy"; 26 }; 27 28 nativeBuildInputs = with rustPlatform; [ 29 setuptools-rust 30 rust.rustc 31 rust.cargo 32 cargoSetupHook 33 ]; 34 35 pythonImportsCheck = [ "rtoml" ]; 36 37 checkInputs = [ pytestCheckHook ]; 38 preCheck = '' 39 cd tests 40 ''; 41 42 meta = with lib; { 43 description = "Rust based TOML library for python"; 44 homepage = "https://github.com/samuelcolvin/rtoml"; 45 license = licenses.mit; 46 maintainers = with maintainers; [ evils ]; 47 }; 48}