Merge pull request #277935 from quantenzitrone/gprename

gprename: init at 20230429
This commit is contained in:
maxine 2024-01-26 17:34:48 +01:00 committed by GitHub
commit 816e6ed80f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 79 additions and 1 deletions

View File

@ -15379,7 +15379,7 @@
name = "Jonathan Wright";
};
quantenzitrone = {
email = "quantenzitrone@protonmail.com";
email = "nix@dev.quantenzitrone.eu";
github = "quantenzitrone";
githubId = 74491719;
matrix = "@quantenzitrone:matrix.org";

View File

@ -0,0 +1,78 @@
{
lib,
stdenv,
fetchzip,
makeWrapper,
moreutils,
perlPackages,
gettext,
glib,
gtk3,
gobject-introspection,
pango,
harfbuzz,
gdk-pixbuf,
at-spi2-atk,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "gprename";
version = "20230429";
src = fetchzip {
url = "mirror://sourceforge/gprename/gprename-${finalAttrs.version}.zip";
hash = "sha256-Du9OO2qeB1jUEJFcVYmLbJAGi2p/IVe3sqladq09AyY=";
};
nativeBuildInputs = [
makeWrapper
moreutils
];
postPatch = ''
grep -Ev 'desktop-file-install|update-desktop-database' Makefile | sponge Makefile
substituteInPlace Makefile \
--replace '/usr/share' '$(DESTDIR)/share'
substituteInPlace bin/gprename \
--replace '/usr/share' $out/share \
--replace '/usr/local/share' $out/share
'';
makeFlags = [ "DESTDIR=$(out)" ];
buildInputs = [
perlPackages.perl
pango
];
postInstall = ''
wrapProgram $out/bin/gprename \
--set PERL5LIB ${
perlPackages.makeFullPerlPath (
with perlPackages; [
Pango
Glib
Gtk3
LocaleGettext
libintl-perl
]
)
} \
--prefix GI_TYPELIB_PATH : ${
lib.makeSearchPath "/lib/girepository-1.0" [
gtk3
pango.out
harfbuzz
gdk-pixbuf
at-spi2-atk
]
}
'';
meta = {
description = "Complete batch renamer for files and directories";
homepage = "https://gprename.sourceforge.net/index.php";
license = lib.licenses.gpl3Plus;
mainProgram = "gprename";
maintainers = with lib.maintainers; [ quantenzitrone ];
};
})