nixpkgs/pkgs/by-name/te/tev/package.nix
Silvan Mosberger 4f0dadbf38 treewide: format all inactive Nix files
After final improvements to the official formatter implementation,
this commit now performs the first treewide reformat of Nix files using it.
This is part of the implementation of RFC 166.

Only "inactive" files are reformatted, meaning only files that
aren't being touched by any PR with activity in the past 2 months.
This is to avoid conflicts for PRs that might soon be merged.
Later we can do a full treewide reformat to get the rest,
which should not cause as many conflicts.

A CI check has already been running for some time to ensure that new and
already-formatted files are formatted, so the files being reformatted here
should also stay formatted.

This commit was automatically created and can be verified using

    nix-build a08b3a4d19.tar.gz \
      --argstr baseRev b32a094368
    result/bin/apply-formatting $NIXPKGS_PATH
2024-12-10 20:26:33 +01:00

83 lines
2.0 KiB
Nix

{
lib,
stdenv,
fetchFromGitHub,
cmake,
wrapGAppsHook3,
libX11,
libzip,
glfw,
libpng,
xorg,
zenity,
}:
stdenv.mkDerivation rec {
pname = "tev";
version = "1.29";
src = fetchFromGitHub {
owner = "Tom94";
repo = pname;
rev = "v${version}";
fetchSubmodules = true;
hash = "sha256-ke1T5nOrDoJilpfshAIAFWw/640Gm5OaxZ+ZakCevTs=";
};
nativeBuildInputs = [
cmake
wrapGAppsHook3
];
buildInputs =
[
libX11
libzip
glfw
libpng
]
++ (with xorg; [
libXrandr
libXinerama
libXcursor
libXi
libXxf86vm
libXext
]);
dontWrapGApps = true; # We also need zenity (see below)
cmakeFlags = [
"-DTEV_DEPLOY=1" # Only relevant not to append "dev" to the version
];
postInstall = ''
wrapProgram $out/bin/tev \
"''${gappsWrapperArgs[@]}" \
--prefix PATH ":" "${zenity}/bin"
'';
env.CXXFLAGS = "-include cstdint";
meta = with lib; {
description = "High dynamic range (HDR) image comparison tool";
mainProgram = "tev";
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;
changelog = "https://github.com/Tom94/tev/releases/tag/v${version}";
license = licenses.bsd3;
platforms = platforms.unix;
broken = stdenv.hostPlatform.isDarwin; # needs apple frameworks + SDK fix? see #205247
maintainers = [ ];
};
}