2021-01-11 08:54:33 +01:00
|
|
|
{ lib, stdenv, fetchgit, makeWrapper, gettext
|
2016-07-22 11:27:43 +02:00
|
|
|
, python27, python2Packages
|
|
|
|
}:
|
|
|
|
|
2019-08-13 23:52:01 +02:00
|
|
|
stdenv.mkDerivation {
|
2019-08-15 14:41:18 +02:00
|
|
|
pname = "metamorphose2";
|
2016-07-22 11:27:43 +02:00
|
|
|
version = "0.9.0beta";
|
|
|
|
|
|
|
|
# exif-py vendored via submodule
|
|
|
|
# mutagen vendored via copy
|
|
|
|
src = fetchgit {
|
|
|
|
url = "https://github.com/metamorphose/metamorphose2.git";
|
|
|
|
#rev = "refs/tags/v2.${version}"; #for when wxPython3 support is released
|
|
|
|
rev = "d2bdd6a86340b9668e93b35a6a568894c9909d68";
|
|
|
|
sha256 = "0ivcb3c8hidrff0ivl4dnwa2p3ihpqjdbvdig8dhg9mm5phdbabn";
|
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace messages/Makefile \
|
|
|
|
--replace "\$(shell which msgfmt)" "${gettext}/bin/msgfmt"
|
|
|
|
'';
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
rm $out/bin/metamorphose2
|
|
|
|
makeWrapper ${python27}/bin/python $out/bin/metamorphose2 \
|
|
|
|
--prefix PYTHONPATH : $PYTHONPATH:$(toPythonPath "$out") \
|
|
|
|
--add-flags "-O $out/share/metamorphose2/metamorphose2.py -w=3"
|
|
|
|
'';
|
|
|
|
|
|
|
|
buildInput = [ gettext python27 ];
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
propagatedBuildInputs = [ python2Packages.wxPython python2Packages.pillow ];
|
|
|
|
|
|
|
|
makeFlags = [ "PREFIX=$(out)" ];
|
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2016-07-22 11:27:43 +02:00
|
|
|
description = "a graphical mass renaming program for files and folders";
|
|
|
|
homepage = "https://github.com/metamorphose/metamorphose2";
|
|
|
|
license = with licenses; gpl3Plus;
|
2017-12-05 23:20:11 +01:00
|
|
|
maintainers = with maintainers; [ ramkromberg ];
|
2016-07-22 11:27:43 +02:00
|
|
|
platforms = with platforms; linux;
|
|
|
|
};
|
|
|
|
}
|