2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
2024-10-04 16:56:33 +00:00
|
|
|
fetchpatch2,
|
2024-06-05 15:53:02 +00:00
|
|
|
mock,
|
|
|
|
pytestCheckHook,
|
2024-10-04 16:56:33 +00:00
|
|
|
nix-update-script,
|
2021-05-28 09:39:13 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "vdf";
|
2021-05-28 09:39:13 +00:00
|
|
|
version = "3.4";
|
2024-01-02 11:29:13 +00:00
|
|
|
format = "setuptools";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "ValvePython";
|
2024-10-04 16:56:33 +00:00
|
|
|
repo = "vdf";
|
|
|
|
rev = "refs/tags/v${version}";
|
2021-05-28 09:39:13 +00:00
|
|
|
hash = "sha256-6ozglzZZNKDtADkHwxX2Zsnkh6BE8WbcRcC9HkTTgPU=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-10-04 16:56:33 +00:00
|
|
|
patches = [
|
|
|
|
# Support appinfo.vdf v29 (required by protontricks 1.12.0)
|
|
|
|
(fetchpatch2 {
|
|
|
|
url = "https://github.com/Matoking/vdf/commit/981cad270c2558aeb8eccaf42cfcf9fabbbed199.patch";
|
|
|
|
hash = "sha256-kLAbbB0WHjxq4rokLoGTPx43BU44EshteR59Ey9JnXo=";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeCheckInputs = [
|
|
|
|
mock
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
2024-10-04 16:56:33 +00:00
|
|
|
|
2021-05-28 09:39:13 +00:00
|
|
|
pythonImportsCheck = [ "vdf" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-10-04 16:56:33 +00:00
|
|
|
# Use nix-update-script instead of the default python updater
|
|
|
|
# The python updater requires GitHub releases, but vdf only uses tags
|
|
|
|
passthru.updateScript = nix-update-script { };
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Library for working with Valve's VDF text format";
|
|
|
|
homepage = "https://github.com/ValvePython/vdf";
|
|
|
|
license = licenses.mit;
|
2021-05-28 09:39:13 +00:00
|
|
|
maintainers = with maintainers; [ kira-bruneau ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|