diff --git a/pkgs/development/python-modules/setuptools-rust/default.nix b/pkgs/development/python-modules/setuptools-rust/default.nix index e3d8a35186a..f7cc04c4eeb 100644 --- a/pkgs/development/python-modules/setuptools-rust/default.nix +++ b/pkgs/development/python-modules/setuptools-rust/default.nix @@ -2,7 +2,7 @@ , lib , buildPythonPackage , fetchPypi -, isPy27 +, pythonOlder , semantic-version , setuptools , setuptools-scm @@ -11,12 +11,12 @@ buildPythonPackage rec { pname = "setuptools-rust"; - version = "0.11.6"; - disabled = isPy27; + version = "0.12.1"; + disabled = pythonOlder "3.6"; src = fetchPypi { inherit pname version; - sha256 = "a5b5954909cbc5d66b914ee6763f81fa2610916041c7266105a469f504a7c4ca"; + sha256 = "647009e924f0ae439c7f3e0141a184a69ad247ecb9044c511dabde232d3d570e"; }; nativeBuildInputs = [ setuptools-scm ]; diff --git a/pkgs/development/python-modules/setuptools-rust/pyo3-test/default.nix b/pkgs/development/python-modules/setuptools-rust/pyo3-test/default.nix index 9af17aa5159..31730d6ff2d 100644 --- a/pkgs/development/python-modules/setuptools-rust/pyo3-test/default.nix +++ b/pkgs/development/python-modules/setuptools-rust/pyo3-test/default.nix @@ -17,5 +17,9 @@ callPackage ../../../tools/rust/maturin/pyo3-test/generic.nix { rust.rustc ]); - sourceRoot = "source/examples/word-count"; + preConfigure = '' + # sourceRoot puts Cargo.lock in the wrong place due to the + # example setup. + cd examples/word-count + ''; } diff --git a/pkgs/development/tools/rust/maturin/pyo3-test/default.nix b/pkgs/development/tools/rust/maturin/pyo3-test/default.nix index b118309b36d..7f79c8565d2 100644 --- a/pkgs/development/tools/rust/maturin/pyo3-test/default.nix +++ b/pkgs/development/tools/rust/maturin/pyo3-test/default.nix @@ -1,8 +1,8 @@ -{ callPackage +{ python3 , rustPlatform }: -callPackage ./generic.nix { +python3.pkgs.callPackage ./generic.nix { buildAndTestSubdir = "examples/word-count"; nativeBuildInputs = with rustPlatform; [ diff --git a/pkgs/development/tools/rust/maturin/pyo3-test/generic.nix b/pkgs/development/tools/rust/maturin/pyo3-test/generic.nix index f82c988fc51..41175ad8538 100644 --- a/pkgs/development/tools/rust/maturin/pyo3-test/generic.nix +++ b/pkgs/development/tools/rust/maturin/pyo3-test/generic.nix @@ -3,17 +3,17 @@ { lib , fetchFromGitHub -, python3Packages +, python , rustPlatform , nativeBuildInputs , buildAndTestSubdir ? null , format ? "pyproject" -, sourceRoot ? "source" +, preConfigure ? "" }: -python3Packages.buildPythonPackage rec { +python.pkgs.buildPythonPackage rec { pname = "word-count"; version = "0.13.2"; @@ -25,14 +25,14 @@ python3Packages.buildPythonPackage rec { }; cargoDeps = rustPlatform.fetchCargoTarball { - inherit src sourceRoot patches; + inherit src patches; name = "${pname}-${version}"; hash = "sha256-//TmozgWy9zrSpMKX92XdHj4fw/T1Elfgn4YhhR7ot0="; }; patches = [ ./Cargo.lock.patch ]; - inherit buildAndTestSubdir format nativeBuildInputs sourceRoot; + inherit buildAndTestSubdir format nativeBuildInputs preConfigure; pythonImportsCheck = [ "word_count" ];