Skip to content

Conversation

@kuflierl
Copy link
Member

@kuflierl kuflierl commented Jun 3, 2025

Changes:

  • adopt
  • podofo 0.9 -> 0.10
  • switch to explicit qt5 lib
  • remove with lib;
  • migrate to pkgs/by-name
  • switch to finalAttrs
  • switch to stdenv.mkDerivation from mkDerivation

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • Nixpkgs 25.11 Release Notes (or backporting 24.11 and 25.05 Nixpkgs Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
  • NixOS 25.11 Release Notes (or backporting 24.11 and 25.05 NixOS Release notes)
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

@kuflierl kuflierl force-pushed the krename-podofo-0_10 branch from 0f062e9 to fb0ab71 Compare June 3, 2025 01:12
@github-actions github-actions bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux. labels Jun 3, 2025
@nix-owners nix-owners bot requested a review from peterhoeg June 3, 2025 01:18
@kuflierl
Copy link
Member Author

kuflierl commented Jun 3, 2025

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 413435
Commit: 0f062e9aa5dad4e3356d8552aed042088ab3ff67


x86_64-linux

✅ 1 package built:
  • krename

@peterhoeg
Copy link
Member

Looks good from here. I haven't had this issue myself as I'm running the beta with qt6 support which works with the latest podofo. Maybe while at it, can you move it to pkgs/by-name and finalAttrs?

Here's my local patch.

diff --git a/pkgs/applications/misc/krename/default.nix b/pkgs/applications/misc/krename/default.nix
deleted file mode 100644
index 58e81790e683..000000000000
--- a/pkgs/applications/misc/krename/default.nix
+++ /dev/null
@@ -1,68 +0,0 @@
-{
-  mkDerivation,
-  fetchurl,
-  fetchpatch,
-  lib,
-  extra-cmake-modules,
-  kdoctools,
-  wrapGAppsHook3,
-  kconfig,
-  kinit,
-  kjsembed,
-  taglib,
-  exiv2,
-  podofo,
-  kcrash,
-}:
-
-let
-  pname = "krename";
-  version = "5.0.2";
-
-in
-mkDerivation rec {
-  name = "${pname}-${version}";
-
-  src = fetchurl {
-    url = "mirror://kde/stable/${pname}/${version}/src/${name}.tar.xz";
-    sha256 = "sha256-sjxgp93Z9ttN1/VaxV/MqKVY+miq+PpcuJ4er2kvI+0=";
-  };
-
-  patches = [
-    (fetchpatch {
-      name = "fix-build-with-exiv2-0.28.patch";
-      url = "https://invent.kde.org/utilities/krename/-/commit/e7dd767a9a1068ee1fe1502c4d619b57d3b12add.patch";
-      hash = "sha256-JpLVbegRHJbXi/Z99nZt9kgNTetBi+L9GfKv5s3LAZw=";
-    })
-  ];
-
-  buildInputs = [
-    taglib
-    exiv2
-    podofo
-  ];
-
-  nativeBuildInputs = [
-    extra-cmake-modules
-    kdoctools
-    wrapGAppsHook3
-  ];
-
-  propagatedBuildInputs = [
-    kconfig
-    kcrash
-    kinit
-    kjsembed
-  ];
-
-  NIX_LDFLAGS = "-ltag";
-
-  meta = with lib; {
-    description = "Powerful batch renamer for KDE";
-    mainProgram = "krename";
-    homepage = "https://kde.org/applications/utilities/krename/";
-    license = licenses.gpl2;
-    maintainers = with maintainers; [ peterhoeg ];
-    inherit (kconfig.meta) platforms;
-  };
-}
diff --git a/pkgs/by-name/kr/krename/package.nix b/pkgs/by-name/kr/krename/package.nix
new file mode 100644
index 000000000000..03a25a78328f
--- /dev/null
+++ b/pkgs/by-name/kr/krename/package.nix
@@ -0,0 +1,57 @@
+{
+  stdenv,
+  fetchurl,
+  fetchFromGitLab,
+  lib,
+  extra-cmake-modules,
+  kdePackages,
+  taglib,
+  exiv2,
+  podofo,
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "krename";
+  version = "5.0.60";
+
+  # src = fetchurl {
+  #   url = "mirror://kde/stable/krename/${version}/src/krename-${finalAttrs.version}.tar.xz";
+  #   hash = "sha256-sjxgp93Z9ttN1/VaxV/MqKVY+miq+PpcuJ4er2kvI+0=";
+  # };
+
+  src = fetchFromGitLab {
+    domain = "invent.kde.org";
+    owner = "utilities";
+    repo = "krename";
+    rev = "1d7b03864d0394a77c37c57c09d1ef57b0378cd1";
+    hash = "sha256-zdTg5xMNMSuDSuVBguPY/T3Pl6p+Ktv3rVckKCC9izY=";
+  };
+
+  buildInputs = with kdePackages; [
+    exiv2
+    podofo
+    kio
+    kxmlgui
+    qtbase
+    qtdeclarative
+    qt5compat
+    taglib
+  ];
+
+  nativeBuildInputs = [
+    extra-cmake-modules
+    kdePackages.kdoctools
+    kdePackages.wrapQtAppsHook
+  ];
+
+  env.NIX_LDFLAGS = "-ltag";
+
+  meta = with lib; {
+    description = "Powerful batch renamer for KDE";
+    mainProgram = "krename";
+    homepage = "https://kde.org/applications/utilities/krename/";
+    license = licenses.gpl2;
+    maintainers = with maintainers; [ peterhoeg ];
+    inherit (kdePackages.qtbase.meta) platforms;
+  };
+})
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 01babb4544c1..46d92d083af4 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -4049,8 +4049,6 @@ with pkgs;
 
   kio-fuse = libsForQt5.callPackage ../tools/filesystems/kio-fuse { };
 
-  krename = libsForQt5.callPackage ../applications/misc/krename { };
-
   krunner-pass = libsForQt5.callPackage ../tools/security/krunner-pass { };
 
   krunner-translator = libsForQt5.callPackage ../tools/misc/krunner-translator { };

@kuflierl kuflierl force-pushed the krename-podofo-0_10 branch from fb0ab71 to 02eb8e6 Compare June 4, 2025 23:43
@kuflierl kuflierl changed the title krename: switch to podofo 0.10, adopt, remove with lib, pname krename: 5.0.2 -> 5.0.60-unstable-f72db95, dep podofo 0.9 -> 0.10, adopt, refactor Jun 4, 2025
@peterhoeg
Copy link
Member

We typically don't jump to unstable/unrelased versions unless there is a very good reason to do so. Qt5 works fine and that's why I didn't create a PR earlier but just kept the changes locally.

I suggest mark this as draft and rejig it when a proper krename release is made.

@kuflierl
Copy link
Member Author

We typically don't jump to unstable/unrelased versions unless there is a very good reason to do so. Qt5 works fine and that's why I didn't create a PR earlier but just kept the changes locally.

I suggest mark this as draft and rejig it when a proper krename release is made.

The thing is that i probably don't have the necessary perms to make it a draft again

@peterhoeg peterhoeg marked this pull request as draft June 22, 2025 07:55
@nixpkgs-ci nixpkgs-ci bot added the 2.status: merge conflict This PR has merge conflicts with the target branch label Jun 25, 2025
@kuflierl kuflierl force-pushed the krename-podofo-0_10 branch from 02eb8e6 to 3ff88a3 Compare June 26, 2025 20:58
@kuflierl kuflierl marked this pull request as ready for review June 26, 2025 20:59
@ofborg ofborg bot removed the 2.status: merge conflict This PR has merge conflicts with the target branch label Jun 26, 2025
@kuflierl kuflierl force-pushed the krename-podofo-0_10 branch from 3ff88a3 to 1dde9c9 Compare June 26, 2025 21:19
@kuflierl kuflierl changed the title krename: 5.0.2 -> 5.0.60-unstable-f72db95, dep podofo 0.9 -> 0.10, adopt, refactor krename: switch to podofo 0.10, adopt, refactor Jun 26, 2025
@kuflierl
Copy link
Member Author

kuflierl commented Jun 27, 2025

@peterhoeg I think this is probably what you wanted

@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/prs-ready-for-review/3032/5716

@kuflierl kuflierl force-pushed the krename-podofo-0_10 branch from 973e447 to e65aa4b Compare August 2, 2025 22:34
changes:
- adopt
- podofo 0.9 -> 0.10
- switch to explicit qt5 lib
- remove `with lib;`
- migrate to pkgs/by-name
- switch to finalAttrs
- switch to stdenv.mkDerivation from mkDerivation
- remove pname from src url
@kuflierl kuflierl force-pushed the krename-podofo-0_10 branch from e65aa4b to 2c427af Compare August 2, 2025 22:37
@nixpkgs-ci nixpkgs-ci bot added the 2.status: merge conflict This PR has merge conflicts with the target branch label Sep 4, 2025
@peterhoeg peterhoeg mentioned this pull request Sep 7, 2025
13 tasks
@peterhoeg
Copy link
Member

Closing in favour of #440935

@peterhoeg peterhoeg closed this Sep 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

2.status: merge conflict This PR has merge conflicts with the target branch 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants