From 8ee83677f83fef57cc4b06846ff64c739fd4b533 Mon Sep 17 00:00:00 2001 From: Weijia Wang <9713184+wegank@users.noreply.github.com> Date: Sat, 30 May 2026 20:39:31 +0200 Subject: [PATCH] grantlee: migrate to pkgs/by-name --- .../gr/grantlee}/grantlee-nix-profiles.patch | 0 .../grantlee-no-canonicalize-filepath.patch | 0 .../gr/grantlee/package.nix} | 18 +++++---- .../5 => by-name/gr/grantlee}/setup-hook.sh | 0 .../libraries/grantlee/default.nix | 38 ------------------- pkgs/top-level/all-packages.nix | 2 - pkgs/top-level/qt5-packages.nix | 2 +- 7 files changed, 11 insertions(+), 49 deletions(-) rename pkgs/{development/libraries/grantlee/5 => by-name/gr/grantlee}/grantlee-nix-profiles.patch (100%) rename pkgs/{development/libraries/grantlee/5 => by-name/gr/grantlee}/grantlee-no-canonicalize-filepath.patch (100%) rename pkgs/{development/libraries/grantlee/5/default.nix => by-name/gr/grantlee/package.nix} (89%) rename pkgs/{development/libraries/grantlee/5 => by-name/gr/grantlee}/setup-hook.sh (100%) delete mode 100644 pkgs/development/libraries/grantlee/default.nix diff --git a/pkgs/development/libraries/grantlee/5/grantlee-nix-profiles.patch b/pkgs/by-name/gr/grantlee/grantlee-nix-profiles.patch similarity index 100% rename from pkgs/development/libraries/grantlee/5/grantlee-nix-profiles.patch rename to pkgs/by-name/gr/grantlee/grantlee-nix-profiles.patch diff --git a/pkgs/development/libraries/grantlee/5/grantlee-no-canonicalize-filepath.patch b/pkgs/by-name/gr/grantlee/grantlee-no-canonicalize-filepath.patch similarity index 100% rename from pkgs/development/libraries/grantlee/5/grantlee-no-canonicalize-filepath.patch rename to pkgs/by-name/gr/grantlee/grantlee-no-canonicalize-filepath.patch diff --git a/pkgs/development/libraries/grantlee/5/default.nix b/pkgs/by-name/gr/grantlee/package.nix similarity index 89% rename from pkgs/development/libraries/grantlee/5/default.nix rename to pkgs/by-name/gr/grantlee/package.nix index b0818c670a05..a32612b986e7 100644 --- a/pkgs/development/libraries/grantlee/5/default.nix +++ b/pkgs/by-name/gr/grantlee/package.nix @@ -1,13 +1,12 @@ { - mkDerivation, lib, + stdenv, fetchFromGitHub, - qtbase, - qtscript, + qt5, cmake, }: -mkDerivation rec { +stdenv.mkDerivation rec { pname = "grantlee"; version = "5.3.1"; grantleePluginPrefix = "lib/grantlee/${lib.versions.majorMinor version}"; @@ -20,10 +19,13 @@ mkDerivation rec { }; buildInputs = [ - qtbase - qtscript + qt5.qtbase + qt5.qtscript + ]; + nativeBuildInputs = [ + cmake + qt5.wrapQtAppsHook ]; - nativeBuildInputs = [ cmake ]; patches = [ ./grantlee-nix-profiles.patch @@ -63,6 +65,6 @@ mkDerivation rec { homepage = "https://github.com/steveire/grantlee"; maintainers = [ lib.maintainers.ttuegel ]; license = lib.licenses.lgpl21; - inherit (qtbase.meta) platforms; + inherit (qt5.qtbase.meta) platforms; }; } diff --git a/pkgs/development/libraries/grantlee/5/setup-hook.sh b/pkgs/by-name/gr/grantlee/setup-hook.sh similarity index 100% rename from pkgs/development/libraries/grantlee/5/setup-hook.sh rename to pkgs/by-name/gr/grantlee/setup-hook.sh diff --git a/pkgs/development/libraries/grantlee/default.nix b/pkgs/development/libraries/grantlee/default.nix deleted file mode 100644 index 2704d3a718f5..000000000000 --- a/pkgs/development/libraries/grantlee/default.nix +++ /dev/null @@ -1,38 +0,0 @@ -{ - stdenv, - lib, - fetchFromGitHub, - qtbase, - cmake, - wrapQtAppsHook, -}: - -stdenv.mkDerivation rec { - pname = "grantlee"; - version = "5.3.1"; - - src = fetchFromGitHub { - owner = "steveire"; - repo = "grantlee"; - rev = "v${version}"; - hash = "sha256-enP7b6A7Ndew2LJH569fN3IgPu2/KL5rCmU/jmKb9sY="; - }; - - nativeBuildInputs = [ - cmake - wrapQtAppsHook - ]; - buildInputs = [ qtbase ]; - - meta = { - description = "Libraries for text templating with Qt"; - longDescription = '' - Grantlee is a set of Free Software libraries written using the Qt framework. Currently two libraries are shipped with Grantlee: Grantlee Templates and Grantlee TextDocument. - The goal of Grantlee Templates is to make it easier for application developers to separate the structure of documents from the data they contain, opening the door for theming and advanced generation of other text such as code. - The syntax uses the syntax of the Django template system, and the core design of Django is reused in Grantlee. - ''; - - homepage = "https://github.com/steveire/grantlee"; - license = lib.licenses.lgpl21Plus; - }; -} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 8d0e11e21108..85e11c00929a 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -6270,8 +6270,6 @@ with pkgs; gst_all_1 = recurseIntoAttrs (callPackage ../development/libraries/gstreamer { }); - grantlee = libsForQt5.callPackage ../development/libraries/grantlee { }; - glirc = haskell.lib.compose.justStaticExecutables haskellPackages.glirc; # Not moved to aliases while we decide if we should split the package again. diff --git a/pkgs/top-level/qt5-packages.nix b/pkgs/top-level/qt5-packages.nix index 2432f157d63c..b6af4b4bcc4e 100644 --- a/pkgs/top-level/qt5-packages.nix +++ b/pkgs/top-level/qt5-packages.nix @@ -74,7 +74,7 @@ makeScopeWithSplicing' { qgpgme = callPackage ../development/libraries/qgpgme { }; - grantlee = callPackage ../development/libraries/grantlee/5 { }; + grantlee = pkgs.grantlee; herqq = callPackage ../by-name/he/herqq/package.nix { };