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

59 lines
1.3 KiB
Nix
Raw Normal View History

2021-01-14 12:38:33 +01:00
{ stdenv
, lib
2021-04-13 13:01:18 +02:00
, fetchFromSourcehut
2021-01-14 12:38:33 +01:00
, meson
, ninja
, pkg-config
, wrapGAppsHook
, gtk3
, gnome
2021-03-11 17:41:47 +01:00
, zbar
2021-01-14 12:38:33 +01:00
, tiffSupport ? true
, libraw
, jpgSupport ? true
2021-03-11 17:41:47 +01:00
, graphicsmagick
2021-01-14 12:38:33 +01:00
, exiftool
}:
assert jpgSupport -> tiffSupport;
let
inherit (lib) makeBinPath optional optionals optionalString;
runtimePath = makeBinPath (
optional tiffSupport libraw
2021-03-11 17:41:47 +01:00
++ optionals jpgSupport [ graphicsmagick exiftool ]
2021-01-14 12:38:33 +01:00
);
in
stdenv.mkDerivation rec {
pname = "megapixels";
2021-04-13 13:01:18 +02:00
version = "0.16.0";
2021-01-14 12:38:33 +01:00
2021-04-13 13:01:18 +02:00
src = fetchFromSourcehut {
owner = "~martijnbraam";
repo = "megapixels";
2021-01-14 12:38:33 +01:00
rev = version;
2021-04-13 13:01:18 +02:00
sha256 = "0z7sx76x18yqf7carq6mg9lib0zbz0yrd1dsg9qd6hbf5niqis37";
2021-01-14 12:38:33 +01:00
};
nativeBuildInputs = [ meson ninja pkg-config wrapGAppsHook ];
buildInputs = [ gtk3 gnome.adwaita-icon-theme zbar ]
2021-01-14 12:38:33 +01:00
++ optional tiffSupport libraw
2021-03-11 17:41:47 +01:00
++ optional jpgSupport graphicsmagick;
2021-01-14 12:38:33 +01:00
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";
2021-04-13 13:01:18 +02:00
changelog = "https://git.sr.ht/~martijnbraam/megapixels/refs/${version}";
2021-01-14 12:38:33 +01:00
license = licenses.gpl3Only;
maintainers = with maintainers; [ OPNA2608 ];
platforms = platforms.linux;
};
}