Files
nixpkgs/pkgs/development/python-modules/django-vcache/default.nix
Peder Bergebakken Sundt 48bad6fefb treewide: use pname and version in fetchCargoVendor cargoDeps
I grepped for `fetchCargoVendor` and `inherit (finalAttrs) src;`, and wrote this patch by hand.
I tested this with `nix-build --check` on the following attributes, derived from `.meta.position`s that match any of the touched files:

* `amberol.cargoDeps.vendorStaging`
* `atuin-desktop.cargoDeps.vendorStaging`
* `chance.cargoDeps.vendorStaging`
* `clapgrep.cargoDeps.vendorStaging`
* `cutecosmic.cargoDeps.vendorStaging`
* `delineate.cargoDeps.vendorStaging`
* `drawpile.cargoDeps.vendorStaging`
* `drawpile-server-headless.cargoDeps.vendorStaging`
* `field-monitor.cargoDeps.vendorStaging`
* `fractal.cargoDeps.vendorStaging`
* `geopard.cargoDeps.vendorStaging`
* `git-cinnabar.cargoDeps.vendorStaging`
* `gnome-robots.cargoDeps.vendorStaging`
* `insulator2.cargoDeps.vendorStaging`
* `kana.cargoDeps.vendorStaging`
* `key-rack.cargoDeps.vendorStaging`
* `kime.cargoDeps.vendorStaging`
* `krunkit.cargoDeps.vendorStaging`
* `krunvm.cargoDeps.vendorStaging`
* `ladybird.cargoDeps.vendorStaging`
* `libchewing.cargoDeps.vendorStaging`
* `loupe.cargoDeps.vendorStaging`
* `metronome.cargoDeps.vendorStaging`
* `pdns-recursor.cargoDeps.vendorStaging`
* `python314Packages.copykitten.cargoDeps.vendorStaging`
* `python314Packages.django-vcache.cargoDeps.vendorStaging`
* `python314Packages.pdoc-pyo3-sample-library.cargoDeps.vendorStaging`
* `python314Packages.pycambia.cargoDeps.vendorStaging`
* `python314Packages.python-kadmin-rs.cargoDeps.vendorStaging`
* `python314Packages.tlparse.cargoDeps.vendorStaging`
* `python313Packages.copykitten.cargoDeps.vendorStaging`
* `python313Packages.django-vcache.cargoDeps.vendorStaging`
* `python313Packages.pdoc-pyo3-sample-library.cargoDeps.vendorStaging`
* `python313Packages.pycambia.cargoDeps.vendorStaging`
* `python313Packages.python-kadmin-rs.cargoDeps.vendorStaging`
* `python313Packages.tlparse.cargoDeps.vendorStaging`
* `share-preview.cargoDeps.vendorStaging`
* `stratisd.cargoDeps.vendorStaging`
* `taskwarrior3.cargoDeps.vendorStaging`
* `tsukimi.cargoDeps.vendorStaging`
* `wildcard.cargoDeps.vendorStaging`
2026-08-12 15:08:47 +02:00

61 lines
1.3 KiB
Nix

{
lib,
buildPythonPackage,
django,
fetchFromGitLab,
hatchling,
ormsgpack,
pythonOlder,
pyzstd,
rustPlatform,
}:
buildPythonPackage (finalAttrs: {
pname = "django-vcache";
version = "3.1.1";
pyproject = true;
src = fetchFromGitLab {
owner = "glitchtip";
repo = "django-vcache";
tag = "v${finalAttrs.version}";
hash = "sha256-9KsIijeWC97IAD+xlE78UvSSIUp5DbpOdaDRcw8ZxWQ=";
};
cargoDeps = rustPlatform.fetchCargoVendor {
inherit (finalAttrs) pname version src;
hash = "sha256-tpf0r32wNJ/XCmNutoirTobqKgsEX96s4MsI6+p7KlQ=";
};
build-system = [ hatchling ];
dependencies = [
django
ormsgpack
]
++ lib.optional (pythonOlder "3.14") pyzstd;
nativeBuildInputs = [
rustPlatform.cargoSetupHook
rustPlatform.maturinBuildHook
];
pythonImportsCheck = [ "django_vcache" ];
# requires valkey sentinel cluster
doCheck = false;
meta = {
description = "Specialized, lightweight Django cache backend for Valkey";
homepage = "https://gitlab.com/glitchtip/django-vcache/";
changelog = "https://gitlab.com/glitchtip/django-vcache/-/blob/main/CHANGELOG.md#${
lib.replaceString "." "" finalAttrs.version
}";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [
defelo
felbinger
];
};
})