nixpkgs-suyu/pkgs/applications/graphics/megapixels/default.nix
Jan Tojnar 468cb5980b gnome: rename from gnome3
Since GNOME version is now 40, it no longer makes sense to use the old attribute name.
2021-05-08 09:47:42 +02:00

58 lines
1.3 KiB
Nix

{ stdenv
, lib
, fetchFromSourcehut
, meson
, ninja
, pkg-config
, wrapGAppsHook
, gtk3
, gnome
, zbar
, tiffSupport ? true
, libraw
, jpgSupport ? true
, graphicsmagick
, exiftool
}:
assert jpgSupport -> tiffSupport;
let
inherit (lib) makeBinPath optional optionals optionalString;
runtimePath = makeBinPath (
optional tiffSupport libraw
++ optionals jpgSupport [ graphicsmagick exiftool ]
);
in
stdenv.mkDerivation rec {
pname = "megapixels";
version = "0.16.0";
src = fetchFromSourcehut {
owner = "~martijnbraam";
repo = "megapixels";
rev = version;
sha256 = "0z7sx76x18yqf7carq6mg9lib0zbz0yrd1dsg9qd6hbf5niqis37";
};
nativeBuildInputs = [ meson ninja pkg-config wrapGAppsHook ];
buildInputs = [ gtk3 gnome.adwaita-icon-theme zbar ]
++ optional tiffSupport libraw
++ optional jpgSupport graphicsmagick;
preFixup = optionalString (tiffSupport || jpgSupport) ''
gappsWrapperArgs+=(
--prefix PATH : ${runtimePath}
)
'';
meta = with lib; {
description = "GTK3 camera application using raw v4l2 and media-requests";
homepage = "https://sr.ht/~martijnbraam/Megapixels";
changelog = "https://git.sr.ht/~martijnbraam/megapixels/refs/${version}";
license = licenses.gpl3Only;
maintainers = with maintainers; [ OPNA2608 ];
platforms = platforms.linux;
};
}