mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-17 10:24:15 +00:00
4a7f99d55d
Part of: https://github.com/NixOS/nixpkgs/issues/108938 meta = with stdenv.lib; is a widely used pattern. We want to slowly remove the `stdenv.lib` indirection and encourage people to use `lib` directly. Thus let’s start with the meta field. This used a rewriting script to mostly automatically replace all occurances of this pattern, and add the `lib` argument to the package header if it doesn’t exist yet. The script in its current form is available at https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
55 lines
1.8 KiB
Nix
55 lines
1.8 KiB
Nix
{ lib, stdenv, fetchFromGitHub
|
|
, cmake, wrapGAppsHook
|
|
, libX11, libzip, glfw, libpng, xorg, gnome3
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "tev";
|
|
version = "1.16";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "Tom94";
|
|
repo = pname;
|
|
rev = "v${version}";
|
|
fetchSubmodules = true;
|
|
sha256 = "0fn5j9klzrjvz3bq8p9yp9nqikn2fr7bp98c1sxwpwwaadkqy9xf";
|
|
};
|
|
|
|
nativeBuildInputs = [ cmake wrapGAppsHook ];
|
|
buildInputs = [ libX11 libzip glfw libpng ]
|
|
++ (with xorg; [ libXrandr libXinerama libXcursor libXi libXxf86vm ]);
|
|
|
|
dontWrapGApps = true; # We also need zenity (see below)
|
|
|
|
postPatch = ''
|
|
substituteInPlace CMakeLists.txt \
|
|
--replace "/usr/" "''${out}/"
|
|
'';
|
|
|
|
postInstall = ''
|
|
wrapProgram $out/bin/tev \
|
|
"''${gappsWrapperArgs[@]}" \
|
|
--prefix PATH ":" "${gnome3.zenity}/bin"
|
|
'';
|
|
|
|
meta = with lib; {
|
|
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;
|
|
changelog = "https://github.com/Tom94/tev/releases/tag/v${version}";
|
|
license = licenses.bsd3;
|
|
platforms = platforms.unix;
|
|
maintainers = with maintainers; [ primeos ];
|
|
};
|
|
}
|