From 18ed189365e53f4bdfd023d5b749c8c9f3b8f7ab Mon Sep 17 00:00:00 2001 From: evils <30512529+evils@users.noreply.github.com> Date: Mon, 10 May 2021 22:06:17 +0200 Subject: [PATCH] python3.pkgs.rtoml: init at 0.6.1 (#122400) --- .../python-modules/rtoml/default.nix | 48 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 50 insertions(+) create mode 100644 pkgs/development/python-modules/rtoml/default.nix diff --git a/pkgs/development/python-modules/rtoml/default.nix b/pkgs/development/python-modules/rtoml/default.nix new file mode 100644 index 00000000000..f50ad558176 --- /dev/null +++ b/pkgs/development/python-modules/rtoml/default.nix @@ -0,0 +1,48 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, pythonOlder +, setuptools-rust +, rustPlatform +, pytestCheckHook +}: + +buildPythonPackage rec { + pname = "rtoml"; + version = "0.6.1"; + disabled = pythonOlder "3.7"; + + src = fetchFromGitHub { + owner = "samuelcolvin"; + repo = pname; + rev = "v${version}"; + sha256 = "07bf30if1wmbqjp5n4ib43n6frx8ybyxc9fndxncq7aylkrhd7hy"; + }; + + cargoDeps = rustPlatform.fetchCargoTarball { + inherit src; + name = "${pname}-${version}"; + sha256 = "1q082sdac5vm4l3b45rfjp4vppp9y9qhagdjqqfdz8gdhm1k8yyy"; + }; + + nativeBuildInputs = with rustPlatform; [ + setuptools-rust + rust.rustc + rust.cargo + cargoSetupHook + ]; + + pythonImportsCheck = [ "rtoml" ]; + + checkInputs = [ pytestCheckHook ]; + preCheck = '' + cd tests + ''; + + meta = with lib; { + description = "Rust based TOML library for python"; + homepage = "https://github.com/samuelcolvin/rtoml"; + license = licenses.mit; + maintainers = with maintainers; [ evils ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index fc4c6e6f1a4..f4f6a4d6e36 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -7216,6 +7216,8 @@ in { rtmidi-python = callPackage ../development/python-modules/rtmidi-python { }; + rtoml = callPackage ../development/python-modules/rtoml { }; + Rtree = callPackage ../development/python-modules/Rtree { inherit (pkgs) libspatialindex; };