Files
nixpkgs/pkgs/development/python-modules/dirsearch/dirsearch-native.nix
quantenzitrone 53f141f0c0 python3Packages.dirsearch: 0.4.3 -> 0.5.0
also:
- enable structuredAttrs
- add optional-dependencies
- package optional rust backend as sub-package in passthru
- add updateScript (i tested it and it works)
2026-09-08 19:38:27 +02:00

53 lines
1.2 KiB
Nix

{
buildPythonPackage,
rustPlatform,
pythonOlder,
# attributes from dirsearch
src,
meta,
}:
buildPythonPackage (finalAttrs: {
pname = "dirsearch-native";
# dirsearchs updateScript will fail if upstream bumps the version string for dirsearch_native.
# I don't think there is anything I can do about until upstream either releases the 2 python
# packages separately or versions them alongside each other
# upstream issue https://github.com/maurosoria/dirsearch/issues/1640
version = "0.1.0";
disabled = pythonOlder "3.14";
inherit src;
sourceRoot = "${finalAttrs.src.name}/native";
cargoDeps = rustPlatform.fetchCargoVendor {
inherit (finalAttrs)
pname
version
src
sourceRoot
;
hash = "sha256-5LgxxVknZXMYkh9ozuUx0UGfDeuU2dzFy7nLPhlrvJs=";
};
pyproject = true;
build-system = [
rustPlatform.cargoSetupHook
rustPlatform.maturinBuildHook
];
nativeCheckInputs = [
rustPlatform.cargoCheckHook
];
pythonImportsCheck = [ "dirsearch_native" ];
meta = {
description = "Rust native backend for dirsearch";
inherit (meta)
homepage
changelog
license
maintainers
;
};
})