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