nixpkgs/pkgs/development/python-modules/specfile/default.nix
2026-02-15 23:39:51 +00:00

57 lines
1.1 KiB
Nix

{
lib,
buildPythonPackage,
fetchFromGitHub,
flexmock,
git,
pytestCheckHook,
rpm,
setuptools-scm,
setuptools,
}:
buildPythonPackage (finalAttrs: {
pname = "specfile";
version = "0.39.1";
pyproject = true;
src = fetchFromGitHub {
owner = "packit";
repo = "specfile";
tag = finalAttrs.version;
postFetch = ''
# export-subst prevents reproducibility
rm "$out/.git_archival.txt"
'';
hash = "sha256-z9HGnBLdtJ4uzm1DJFD0QN/DZNTdBbZcPx/kefCYnkc=";
};
build-system = [
setuptools
setuptools-scm
];
dependencies = [ rpm ];
nativeCheckInputs = [
git
flexmock
pytestCheckHook
];
pythonImportsCheck = [ "specfile" ];
disabledTests = [
# AssertionError
"test_update_tag"
"test_shell_expansions"
];
meta = {
description = "Library for parsing and manipulating RPM spec files";
homepage = "https://github.com/packit/specfile";
changelog = "https://github.com/packit/specfile/blob/${finalAttrs.src.tag}/CHANGELOG.md";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ fab ];
};
})