nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at devShellTools-shell 54 lines 1.3 kB view raw
1{ 2 lib, 3 stdenv, 4 fetchFromGitHub, 5 makeWrapper, 6 gettext, 7 python3, 8}: 9 10stdenv.mkDerivation { 11 pname = "metamorphose2"; 12 version = "0.10.0beta"; 13 14 # exif-py vendored via submodule 15 src = fetchFromGitHub { 16 owner = "timinaust"; 17 repo = "metamorphose2"; 18 rev = "ba0666dd02e4f3f58c1dadc309e7ec1cc13fe851"; 19 sha256 = "0w9l1vyyswdhdwrmi71g23qyslvhg1xym4ksifd42vwf9dxy55qp"; 20 fetchSubmodules = true; 21 }; 22 23 postPatch = '' 24 rm -rf ./src/mutagen 25 substituteInPlace messages/Makefile \ 26 --replace "\$(shell which msgfmt)" "${gettext}/bin/msgfmt" 27 ''; 28 29 postInstall = '' 30 rm $out/bin/metamorphose2 31 makeWrapper ${python3.interpreter} $out/bin/metamorphose2 \ 32 --prefix PYTHONPATH : $PYTHONPATH:$(toPythonPath "$out") \ 33 --add-flags "-O $out/share/metamorphose2/metamorphose2.py -w=3" 34 ''; 35 36 nativeBuildInputs = [ makeWrapper ]; 37 propagatedBuildInputs = with python3.pkgs; [ 38 mutagen 39 wxpython 40 pillow 41 six 42 ]; 43 44 makeFlags = [ "PREFIX=$(out)" ]; 45 46 meta = with lib; { 47 description = "Graphical mass renaming program for files and folders"; 48 homepage = "https://github.com/timinaust/metamorphose2"; 49 license = with licenses; gpl3Plus; 50 maintainers = with maintainers; [ ramkromberg ]; 51 platforms = with platforms; linux; 52 mainProgram = "metamorphose2"; 53 }; 54}