3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/python-modules/setuptools-rust/pyo3-test/default.nix
Daniël de Kok 313177129b python3Packages.setuptools-rust: fix passthru test
The build wanted to create a Cargo.lock in the top-level source
directory (presumably because it is also a Cargo project), since we
were crating the lock file in sourceRoot (which was set to the example
project). This failed because the sources are read-only. Change the
test to create the lock file in the top-level crate directory, which
is Cargo's default behavior.
2021-03-20 08:38:28 +01:00

26 lines
564 B
Nix

{ callPackage
, rustPlatform
, setuptools-rust
}:
callPackage ../../../tools/rust/maturin/pyo3-test/generic.nix {
# Isolated builds break for this package, because PyO3 is not
# in the build root of the Python Package:
#
# https://github.com/pypa/pip/issues/6276
#
format = "setuptools";
nativeBuildInputs = [ setuptools-rust ] ++ (with rustPlatform; [
cargoSetupHook
rust.cargo
rust.rustc
]);
preConfigure = ''
# sourceRoot puts Cargo.lock in the wrong place due to the
# example setup.
cd examples/word-count
'';
}