Merge pull request #307098 from r-ryantm/auto-update/cilium-cli
[NixPkgs.git] / pkgs / development / python-modules / rtoml / default.nix
blob2ccec6d9e5b10de6563f844d7b3b2650d9fd757c
1 { lib
2 , buildPythonPackage
3 , cargo
4 , fetchFromGitHub
5 , libiconv
6 , pytestCheckHook
7 , pythonOlder
8 , rustPlatform
9 , rustc
10 , setuptools-rust
13 buildPythonPackage rec {
14   pname = "rtoml";
15   version = "0.8";
16   format = "setuptools";
18   disabled = pythonOlder "3.7";
20   src = fetchFromGitHub {
21     owner = "samuelcolvin";
22     repo = pname;
23     rev = "v${version}";
24     hash = "sha256-tvX4KcQGw0khBjEXVFmkhsVyAkdr2Bgm6IfD1yGZ37c=";
25   };
27   cargoDeps = rustPlatform.fetchCargoTarball {
28     inherit src;
29     name = "${pname}-${version}";
30     hash = "sha256-KcF3Z71S7ZNZicViqwpClfT736nYYbKcKWylOP+S3HI=";
31   };
33   nativeBuildInputs = with rustPlatform; [
34     setuptools-rust
35     rustc
36     cargo
37     rustPlatform.cargoSetupHook
38   ];
40   buildInputs = [
41     libiconv
42   ];
44   pythonImportsCheck = [
45     "rtoml"
46   ];
48   nativeCheckInputs = [
49     pytestCheckHook
50   ];
52   preCheck = ''
53     cd tests
54   '';
56   meta = with lib; {
57     description = "Rust based TOML library for Python";
58     homepage = "https://github.com/samuelcolvin/rtoml";
59     license = licenses.mit;
60     maintainers = with maintainers; [ evils ];
61   };