about summary refs log tree commit diff
path: root/pkgs/development/python-modules/rtoml/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/python-modules/rtoml/default.nix')
-rw-r--r--pkgs/development/python-modules/rtoml/default.nix36
1 files changed, 22 insertions, 14 deletions
diff --git a/pkgs/development/python-modules/rtoml/default.nix b/pkgs/development/python-modules/rtoml/default.nix
index 0f4fe3a9966fc..fe83ca2e32dc7 100644
--- a/pkgs/development/python-modules/rtoml/default.nix
+++ b/pkgs/development/python-modules/rtoml/default.nix
@@ -1,20 +1,19 @@
 {
   lib,
   buildPythonPackage,
-  cargo,
   fetchFromGitHub,
   libiconv,
+  dirty-equals,
+  pytest-benchmark,
   pytestCheckHook,
   pythonOlder,
   rustPlatform,
-  rustc,
-  setuptools-rust,
 }:
 
 buildPythonPackage rec {
   pname = "rtoml";
-  version = "0.8";
-  format = "setuptools";
+  version = "0.10";
+  pyproject = true;
 
   disabled = pythonOlder "3.7";
 
@@ -22,30 +21,39 @@ buildPythonPackage rec {
     owner = "samuelcolvin";
     repo = pname;
     rev = "v${version}";
-    hash = "sha256-tvX4KcQGw0khBjEXVFmkhsVyAkdr2Bgm6IfD1yGZ37c=";
+    hash = "sha256-1movtKMQkQ6PEpKpSkK0Oy4AV0ee7XrS0P9m6QwZTaM=";
   };
 
   cargoDeps = rustPlatform.fetchCargoTarball {
     inherit src;
     name = "${pname}-${version}";
-    hash = "sha256-KcF3Z71S7ZNZicViqwpClfT736nYYbKcKWylOP+S3HI=";
+    hash = "sha256-BWcOIZMl4yHxxKxCn6Qh69MlMdz3REp3izN0A1eFX3o=";
   };
 
-  nativeBuildInputs = with rustPlatform; [
-    setuptools-rust
-    rustc
-    cargo
-    rustPlatform.cargoSetupHook
+  build-system = with rustPlatform; [
+    cargoSetupHook
+    maturinBuildHook
   ];
 
   buildInputs = [ libiconv ];
 
   pythonImportsCheck = [ "rtoml" ];
 
-  nativeCheckInputs = [ pytestCheckHook ];
+  nativeCheckInputs = [
+    dirty-equals
+    pytest-benchmark
+    pytestCheckHook
+  ];
+
+  pytestFlagsArray = [ "--benchmark-disable" ];
+
+  disabledTests = [
+    # TypeError: loads() got an unexpected keyword argument 'name'
+    "test_load_data_toml"
+  ];
 
   preCheck = ''
-    cd tests
+    rm -rf rtoml
   '';
 
   meta = with lib; {