ansible-later: 2.0.22 -> 2.0.23
[NixPkgs.git] / pkgs / development / python-modules / rtoml / default.nix
blob886073951f10b4a734fa8de5ad3e32b1b8dfe2b3
1 { lib
2 , buildPythonPackage
3 , fetchFromGitHub
4 , libiconv
5 , pytestCheckHook
6 , pythonOlder
7 , rustPlatform
8 , setuptools-rust
9 }:
11 buildPythonPackage rec {
12   pname = "rtoml";
13   version = "0.8";
15   disabled = pythonOlder "3.7";
17   src = fetchFromGitHub {
18     owner = "samuelcolvin";
19     repo = pname;
20     rev = "v${version}";
21     sha256 = "sha256-tvX4KcQGw0khBjEXVFmkhsVyAkdr2Bgm6IfD1yGZ37c=";
22   };
24   cargoDeps = rustPlatform.fetchCargoTarball {
25     inherit src;
26     name = "${pname}-${version}";
27     sha256 = "sha256-KcF3Z71S7ZNZicViqwpClfT736nYYbKcKWylOP+S3HI=";
28   };
30   nativeBuildInputs = with rustPlatform; [
31     setuptools-rust
32     rust.rustc
33     rust.cargo
34     cargoSetupHook
35   ];
37   buildInputs = [
38     libiconv
39   ];
41   pythonImportsCheck = [
42     "rtoml"
43   ];
45   checkInputs = [
46     pytestCheckHook
47   ];
49   preCheck = ''
50     cd tests
51   '';
53   meta = with lib; {
54     description = "Rust based TOML library for Python";
55     homepage = "https://github.com/samuelcolvin/rtoml";
56     license = licenses.mit;
57     maintainers = with maintainers; [ evils ];
58   };