Revert "metamorphose2: drop"

This reverts commit 608cde3bd4.
This commit is contained in:
Ram Kromberg 2022-05-25 18:20:59 +03:00
parent 8dc951af1d
commit 61f655ccec
3 changed files with 45 additions and 1 deletions

View file

@ -0,0 +1,43 @@
{ lib, stdenv, fetchgit, makeWrapper, gettext
, python27, python2Packages
}:
stdenv.mkDerivation {
pname = "metamorphose2";
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)" ];
meta = with lib; {
description = "a graphical mass renaming program for files and folders";
homepage = "https://github.com/metamorphose/metamorphose2";
license = with licenses; gpl3Plus;
maintainers = with maintainers; [ ramkromberg ];
platforms = with platforms; linux;
};
}

View file

@ -820,7 +820,6 @@ mapAliases ({
mercurial_4 = throw "mercurial_4 has been removed as it's unmaintained"; # Added 2021-10-18
mesos = throw "mesos has been removed from nixpkgs, as it's unmaintained"; # Added 2020-08-15
mess = mame; # Added 2019-10-30
metamorphose2 = throw "metamorphose2 has been removed from nixpkgs, as it was stuck on python2"; # Added 2022-01-12
mididings = throw "mididings has been removed from nixpkgs as it doesn't support recent python3 versions and its upstream stopped maintaining it"; # Added 2022-01-12
midoriWrapper = throw "'midoriWrapper' has been renamed to/replaced by 'midori'"; # Converted to throw 2022-02-22
mime-types = mailcap; # Added 2022-01-21

View file

@ -8284,6 +8284,8 @@ with pkgs;
mencal = callPackage ../applications/misc/mencal { } ;
metamorphose2 = callPackage ../applications/misc/metamorphose2 { };
metar = callPackage ../applications/misc/metar { };
mfcuk = callPackage ../tools/security/mfcuk { };