From 3f0082d57943db6fbdc934c1ff0211060917eb94 Mon Sep 17 00:00:00 2001 From: Silvan Mosberger Date: Thu, 14 Nov 2019 02:36:30 +0100 Subject: [PATCH 1/2] jpegexiforient: init at unstable-2002-02-17 --- .../tools/graphics/jpegexiforient/default.nix | 27 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 29 insertions(+) create mode 100644 pkgs/tools/graphics/jpegexiforient/default.nix diff --git a/pkgs/tools/graphics/jpegexiforient/default.nix b/pkgs/tools/graphics/jpegexiforient/default.nix new file mode 100644 index 000000000000..9397f46fd2c5 --- /dev/null +++ b/pkgs/tools/graphics/jpegexiforient/default.nix @@ -0,0 +1,27 @@ +{ lib, stdenv, fetchurl }: +stdenv.mkDerivation { + pname = "jpegexiforient"; + version = "unstable-2002-02-17"; + src = fetchurl { + url = "http://sylvana.net/jpegcrop/jpegexiforient.c"; + sha256 = "1v0f42cvs0397g9v46p294ldgxwbp285npg6npgnlnvapk6nzh5s"; + }; + unpackPhase = '' + cp $src jpegexiforient.c + ''; + buildPhase = '' + cc -o jpegexiforient jpegexiforient.c + ''; + installPhase = '' + install -Dt $out/bin jpegexiforient + ''; + meta = with lib; { + description = "Utility program to get and set the Exif Orientation Tag"; + homepage = "http://sylvana.net/jpegcrop/exif_orientation.html"; + # Website doesn't mention any license, but I think it's safe to assume this + # to be free since it's from IJG, the current maintainers of libjpeg + license = licenses.free; + platforms = platforms.all; + maintainers = with maintainers; [ infinisil ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 3e17ee593cbd..dcf805fa4978 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -4226,6 +4226,8 @@ in jpeg-archive = callPackage ../applications/graphics/jpeg-archive { }; + jpegexiforient = callPackage ../tools/graphics/jpegexiforient { }; + jpeginfo = callPackage ../applications/graphics/jpeginfo { }; jpegoptim = callPackage ../applications/graphics/jpegoptim { }; From fd2e1687dc3481b4fc8e24aeafc1a243bbd19c48 Mon Sep 17 00:00:00 2001 From: Silvan Mosberger Date: Thu, 14 Nov 2019 02:36:53 +0100 Subject: [PATCH 2/2] feh: add jpegexiforient to wrapped path This makes `feh --edit` work --- pkgs/applications/graphics/feh/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/graphics/feh/default.nix b/pkgs/applications/graphics/feh/default.nix index fef068eaf0ff..50814f239621 100644 --- a/pkgs/applications/graphics/feh/default.nix +++ b/pkgs/applications/graphics/feh/default.nix @@ -1,6 +1,6 @@ { stdenv, fetchurl, makeWrapper , xorg, imlib2, libjpeg, libpng -, curl, libexif, perlPackages }: +, curl, libexif, jpegexiforient, perlPackages }: with stdenv.lib; @@ -25,7 +25,7 @@ stdenv.mkDerivation rec { installTargets = [ "install" ]; postInstall = '' - wrapProgram "$out/bin/feh" --prefix PATH : "${libjpeg.bin}/bin" \ + wrapProgram "$out/bin/feh" --prefix PATH : "${makeBinPath [ libjpeg jpegexiforient ]}" \ --add-flags '--theme=feh' '';