nixpkgs-suyu/pkgs/applications/graphics/tev/default.nix

59 lines
1.9 KiB
Nix
Raw Normal View History

{ lib, stdenv, fetchFromGitHub
2019-10-27 21:09:59 +01:00
, cmake, wrapGAppsHook
2020-02-06 22:44:50 +01:00
, libX11, libzip, glfw, libpng, xorg, gnome3
2019-10-27 21:09:59 +01:00
}:
stdenv.mkDerivation rec {
pname = "tev";
2021-02-16 14:07:56 +01:00
version = "1.17";
2019-10-27 21:09:59 +01:00
src = fetchFromGitHub {
owner = "Tom94";
repo = pname;
rev = "v${version}";
fetchSubmodules = true;
2021-02-16 14:07:56 +01:00
sha256 = "12wsy2zdfhg0ygkpvz58rk86qiy259fi9grb0jxiz8zcyd6x1ngk";
2019-10-27 21:09:59 +01:00
};
nativeBuildInputs = [ cmake wrapGAppsHook ];
2020-02-06 22:44:50 +01:00
buildInputs = [ libX11 libzip glfw libpng ]
2019-10-27 21:09:59 +01:00
++ (with xorg; [ libXrandr libXinerama libXcursor libXi libXxf86vm ]);
dontWrapGApps = true; # We also need zenity (see below)
postPatch = ''
substituteInPlace CMakeLists.txt \
--replace "/usr/" "''${out}/"
'';
2021-02-16 14:46:25 +01:00
cmakeFlags = [
"-DTEV_DEPLOY=1" # Only relevant not to append "dev" to the version
];
2019-10-27 21:09:59 +01:00
postInstall = ''
wrapProgram $out/bin/tev \
"''${gappsWrapperArgs[@]}" \
--prefix PATH ":" "${gnome3.zenity}/bin"
'';
meta = with lib; {
2019-10-27 21:09:59 +01:00
description = "A high dynamic range (HDR) image comparison tool";
longDescription = ''
A high dynamic range (HDR) image comparison tool for graphics people. tev
allows viewing images through various tonemapping operators and inspecting
the values of individual pixels. Often, it is important to find exact
differences between pairs of images. For this purpose, tev allows rapidly
switching between opened images and visualizing various error metrics (L1,
L2, and relative versions thereof). To avoid clutter, opened images and
their layers can be filtered by keywords.
While the predominantly supported file format is OpenEXR certain other
types of images can also be loaded.
'';
inherit (src.meta) homepage;
2020-03-10 16:07:42 +01:00
changelog = "https://github.com/Tom94/tev/releases/tag/v${version}";
2019-10-27 21:09:59 +01:00
license = licenses.bsd3;
platforms = platforms.unix;
maintainers = with maintainers; [ primeos ];
};
}