From 0bf9809d48c2282a7ee1e4bf9984ad42e24ebfbe Mon Sep 17 00:00:00 2001 From: Sigmanificient Date: Sat, 11 Oct 2025 16:44:53 +0200 Subject: [PATCH 1/3] gcovr: 8.3 -> 8.4 --- pkgs/by-name/gc/gcovr/package.nix | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/pkgs/by-name/gc/gcovr/package.nix b/pkgs/by-name/gc/gcovr/package.nix index 22f796de7838..e56391df68d6 100644 --- a/pkgs/by-name/gc/gcovr/package.nix +++ b/pkgs/by-name/gc/gcovr/package.nix @@ -6,22 +6,26 @@ python3Packages.buildPythonPackage rec { pname = "gcovr"; - version = "8.3"; + version = "8.4"; pyproject = true; disabled = python3Packages.pythonOlder "3.9"; src = fetchPypi { inherit pname version; - hash = "sha256-+qNx+cSn94yYANplUQfU+Z8EtxjRwNn0jK/cvvAEkHk="; + hash = "sha256-jqDPIxdrECnyjbZ51xLKZHezgHCXw3VcE1vcU7Uc+nI="; }; - build-system = [ python3Packages.hatchling ]; + build-system = with python3Packages; [ + hatchling + hatch-fancy-pypi-readme + hatch-vcs + ]; # pythonRelaxDeps do not work on pyproject.toml preBuild = '' substituteInPlace pyproject.toml \ - --replace-fail "hatchling==1.26.1" "hatchling" + --replace-fail "hatchling==1.26.3" "hatchling" substituteInPlace pyproject.toml \ --replace-fail "hatch-fancy-pypi-readme==24.1.0" "hatch-fancy-pypi-readme>=24.1.0" substituteInPlace pyproject.toml \ @@ -36,8 +40,6 @@ python3Packages.buildPythonPackage rec { jinja2 lxml pygments - hatch-fancy-pypi-readme - hatch-vcs ] ++ lib.optionals (pythonOlder "3.11") [ tomli ] ); From 4732cb854ebd87eebd05d2b47de46aff7d0e5aac Mon Sep 17 00:00:00 2001 From: Sigmanificient Date: Sat, 11 Oct 2025 17:27:22 +0200 Subject: [PATCH 2/3] yaxmldiff: init at 0.2.0 --- .../python-modules/yaxmldiff/default.nix | 41 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 43 insertions(+) create mode 100644 pkgs/development/python-modules/yaxmldiff/default.nix diff --git a/pkgs/development/python-modules/yaxmldiff/default.nix b/pkgs/development/python-modules/yaxmldiff/default.nix new file mode 100644 index 000000000000..f018e3785189 --- /dev/null +++ b/pkgs/development/python-modules/yaxmldiff/default.nix @@ -0,0 +1,41 @@ +{ + lib, + buildPythonPackage, + fetchFromGitHub, + # build-system + hatchling, + hatch-fancy-pypi-readme, + # dependencies + lxml, + pytestCheckHook, +}: + +buildPythonPackage rec { + pname = "yaxmldiff"; + version = "0.2.0"; + pyproject = true; + + src = fetchFromGitHub { + owner = "latk"; + repo = "yaxmldiff.py"; + tag = "v${version}"; + hash = "sha256-AOXnK1d+b/ae50ofBfgxiDS6Dj6TIeHMrE9ME95Yj1Q="; + }; + + build-system = [ + hatchling + hatch-fancy-pypi-readme + ]; + + dependencies = [ lxml ]; + + nativeCheckInputs = [ pytestCheckHook ]; + + meta = { + description = "Yet Another XML Differ"; + homepage = "https://github.com/latk/yaxmldiff.py"; + changelog = "https://https://github.com/latk/yaxmldiff.py/blob/v${src.tag}/CHANGELOG.md"; + license = lib.licenses.asl20; + maintainers = with lib.maintainers; [ sigmanificient ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 3ffc11747bd0..473a638394d2 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -20442,6 +20442,8 @@ self: super: with self; { yattag = callPackage ../development/python-modules/yattag { }; + yaxmldiff = callPackage ../development/python-modules/yaxmldiff { }; + ydata-profiling = callPackage ../development/python-modules/ydata-profiling { }; ydiff = callPackage ../development/python-modules/ydiff { }; From 83aa556af332abcaba29ca610d499d76488790ad Mon Sep 17 00:00:00 2001 From: Sigmanificient Date: Sat, 11 Oct 2025 18:08:43 +0200 Subject: [PATCH 3/3] gcovr: build from source, enable tests --- pkgs/by-name/gc/gcovr/package.nix | 44 ++++++++++++++++++++++++------- 1 file changed, 34 insertions(+), 10 deletions(-) diff --git a/pkgs/by-name/gc/gcovr/package.nix b/pkgs/by-name/gc/gcovr/package.nix index e56391df68d6..d7efae7c4556 100644 --- a/pkgs/by-name/gc/gcovr/package.nix +++ b/pkgs/by-name/gc/gcovr/package.nix @@ -1,7 +1,10 @@ { + stdenv, lib, python3Packages, - fetchPypi, + fetchFromGitHub, + writableTmpDirAsHomeHook, + gitMinimal, }: python3Packages.buildPythonPackage rec { @@ -11,9 +14,11 @@ python3Packages.buildPythonPackage rec { disabled = python3Packages.pythonOlder "3.9"; - src = fetchPypi { - inherit pname version; - hash = "sha256-jqDPIxdrECnyjbZ51xLKZHezgHCXw3VcE1vcU7Uc+nI="; + src = fetchFromGitHub { + owner = "gcovr"; + repo = "gcovr"; + tag = version; + hash = "sha256-v3jNODYD9qa3mwttfuldhhIHrfR5LcsZ+WNWiOWb35E="; }; build-system = with python3Packages; [ @@ -44,17 +49,36 @@ python3Packages.buildPythonPackage rec { ++ lib.optionals (pythonOlder "3.11") [ tomli ] ); - # There are no unit tests in the pypi tarball. Most of the unit tests on the - # github repository currently only work with gcc5, so we just disable them. - # See also: https://github.com/gcovr/gcovr/issues/206 - # Despite the CI passing many GCC version, ~300 tests are failing on nixos - doCheck = false; - pythonImportsCheck = [ "gcovr" "gcovr.configuration" ]; + preCheck = '' + rm -rf src # this causes some pycache issues + rm -rf admin/bump_version.py + export CC_REFERENCE="gcc-${lib.versions.major stdenv.cc.version}" + ''; + + nativeCheckInputs = with python3Packages; [ + writableTmpDirAsHomeHook + pytestCheckHook + pytest-timeout + yaxmldiff + nox + requests + gitMinimal + ]; + + disabledTests = [ + # too fragile + "test_build" + "test_example" + # assert 40 == 30 on log levels + "test_multiple_output_formats_to_stdout" + "test_multiple_output_formats_to_stdout_1" + ]; + meta = { description = "Python script for summarizing gcov data"; homepage = "https://www.gcovr.com/";