2024-05-02 00:46:19 +00:00
|
|
|
# Derivation prototype, used by maturin and setuptools-rust
|
|
|
|
# passthrough tests.
|
|
|
|
|
2024-06-30 08:12:46 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
fetchFromGitHub,
|
|
|
|
python,
|
|
|
|
rustPlatform,
|
2024-05-02 00:46:19 +00:00
|
|
|
|
2024-06-30 08:12:46 +00:00
|
|
|
nativeBuildInputs,
|
2024-05-02 00:46:19 +00:00
|
|
|
|
2024-06-30 08:12:46 +00:00
|
|
|
buildAndTestSubdir ? null,
|
|
|
|
format ? "pyproject",
|
|
|
|
preConfigure ? "",
|
2024-05-02 00:46:19 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
python.pkgs.buildPythonPackage rec {
|
|
|
|
pname = "word-count";
|
|
|
|
version = "0.13.2";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "PyO3";
|
|
|
|
repo = "pyo3";
|
|
|
|
rev = "v${version}";
|
|
|
|
hash = "sha256-NOMrrfo8WjlPhtGxWUOPJS/UDDdbLQRCXR++Zd6JmIA=";
|
|
|
|
};
|
|
|
|
|
2024-06-30 08:12:46 +00:00
|
|
|
cargoDeps = rustPlatform.importCargoLock { lockFile = ./Cargo.lock; };
|
2024-05-02 00:46:19 +00:00
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
ln -s ${./Cargo.lock} Cargo.lock
|
|
|
|
'';
|
|
|
|
|
2024-06-30 08:12:46 +00:00
|
|
|
inherit
|
|
|
|
buildAndTestSubdir
|
|
|
|
format
|
|
|
|
nativeBuildInputs
|
|
|
|
preConfigure
|
|
|
|
;
|
2024-05-02 00:46:19 +00:00
|
|
|
|
|
|
|
pythonImportsCheck = [ "word_count" ];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "PyO3 word count example";
|
|
|
|
homepage = "https://github.com/PyO3/pyo3";
|
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = [ ];
|
|
|
|
};
|
|
|
|
}
|