From eff08feb684ab9bf044ffb09aaebe977acfb3341 Mon Sep 17 00:00:00 2001 From: Aliaksandr Date: Thu, 4 Dec 2025 01:19:48 +0200 Subject: [PATCH] cmake-format: migrate to by-name --- .../cm/cmake-format/package.nix} | 20 ++++++------------- pkgs/top-level/all-packages.nix | 2 -- 2 files changed, 6 insertions(+), 16 deletions(-) rename pkgs/{development/tools/cmake-format/default.nix => by-name/cm/cmake-format/package.nix} (66%) diff --git a/pkgs/development/tools/cmake-format/default.nix b/pkgs/by-name/cm/cmake-format/package.nix similarity index 66% rename from pkgs/development/tools/cmake-format/default.nix rename to pkgs/by-name/cm/cmake-format/package.nix index 37d7b3219701..3070e55bc021 100644 --- a/pkgs/development/tools/cmake-format/default.nix +++ b/pkgs/by-name/cm/cmake-format/package.nix @@ -1,16 +1,10 @@ { lib, - buildPythonApplication, + python3Packages, fetchPypi, - autopep8, - flake8, - jinja2, - pylint, - pyyaml, - six, }: -buildPythonApplication rec { +python3Packages.buildPythonApplication rec { pname = "cmake-format"; version = "0.6.13"; # The source distribution does not build because of missing files. @@ -18,12 +12,11 @@ buildPythonApplication rec { src = fetchPypi { inherit version format; - python = "py3"; pname = "cmakelang"; sha256 = "0kmggnfbv6bba75l3zfzqwk0swi90brjka307m2kcz2w35kr8jvn"; }; - propagatedBuildInputs = [ + dependencies = with python3Packages; [ autopep8 flake8 jinja2 @@ -34,12 +27,11 @@ buildPythonApplication rec { doCheck = false; - meta = with lib; { + meta = { description = "Source code formatter for cmake listfiles"; homepage = "https://github.com/cheshirekow/cmake_format"; - license = licenses.gpl3; - maintainers = [ maintainers.tobim ]; + license = lib.licenses.gpl3; + maintainers = with lib.maintainers; [ tobim ]; mainProgram = "cmake-format"; - platforms = platforms.all; }; } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index eb80334a36b6..f2374b9eb2c9 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -6322,8 +6322,6 @@ with pkgs; ]; }; - cmake-format = python3Packages.callPackage ../development/tools/cmake-format { }; - # Does not actually depend on Qt 5 inherit (plasma5Packages) extra-cmake-modules;