2021-02-05 17:12:51 +00:00
|
|
|
{ stdenv
|
|
|
|
, lib
|
2021-04-13 19:44:15 +00:00
|
|
|
, fetchFromSourcehut
|
2021-02-05 17:12:51 +00:00
|
|
|
, meson
|
|
|
|
, ninja
|
|
|
|
, pkg-config
|
|
|
|
, wrapGAppsHook
|
2021-05-20 23:08:51 +00:00
|
|
|
, epoxy
|
|
|
|
, gtk4
|
2021-03-12 07:09:13 +00:00
|
|
|
, zbar
|
2021-02-05 17:12:51 +00:00
|
|
|
, tiffSupport ? true
|
|
|
|
, libraw
|
|
|
|
, jpgSupport ? true
|
2021-03-12 07:09:13 +00:00
|
|
|
, graphicsmagick
|
2021-02-05 17:12:51 +00:00
|
|
|
, exiftool
|
|
|
|
}:
|
|
|
|
|
|
|
|
assert jpgSupport -> tiffSupport;
|
|
|
|
|
|
|
|
let
|
|
|
|
inherit (lib) makeBinPath optional optionals optionalString;
|
|
|
|
runtimePath = makeBinPath (
|
|
|
|
optional tiffSupport libraw
|
2021-03-12 07:09:13 +00:00
|
|
|
++ optionals jpgSupport [ graphicsmagick exiftool ]
|
2021-02-05 17:12:51 +00:00
|
|
|
);
|
|
|
|
in
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "megapixels";
|
2021-08-06 21:57:35 +00:00
|
|
|
version = "1.2.0";
|
2021-02-05 17:12:51 +00:00
|
|
|
|
2021-04-13 19:44:15 +00:00
|
|
|
src = fetchFromSourcehut {
|
|
|
|
owner = "~martijnbraam";
|
|
|
|
repo = "megapixels";
|
2021-02-05 17:12:51 +00:00
|
|
|
rev = version;
|
2021-08-06 21:57:35 +00:00
|
|
|
sha256 = "0jnfzwvq58p4ksyifma10i158r2fb7fv72ymibgcxbnx596xpjb2";
|
2021-02-05 17:12:51 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ meson ninja pkg-config wrapGAppsHook ];
|
|
|
|
|
2021-05-20 23:08:51 +00:00
|
|
|
buildInputs = [
|
|
|
|
epoxy
|
|
|
|
gtk4
|
|
|
|
zbar
|
|
|
|
];
|
2021-02-05 17:12:51 +00:00
|
|
|
|
|
|
|
preFixup = optionalString (tiffSupport || jpgSupport) ''
|
|
|
|
gappsWrapperArgs+=(
|
|
|
|
--prefix PATH : ${runtimePath}
|
|
|
|
)
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
2021-08-06 21:57:35 +00:00
|
|
|
description = "GTK4 camera application that knows how to deal with the media request api";
|
2021-02-05 17:12:51 +00:00
|
|
|
homepage = "https://sr.ht/~martijnbraam/Megapixels";
|
2021-04-13 19:44:15 +00:00
|
|
|
changelog = "https://git.sr.ht/~martijnbraam/megapixels/refs/${version}";
|
2021-02-05 17:12:51 +00:00
|
|
|
license = licenses.gpl3Only;
|
2021-05-20 23:08:51 +00:00
|
|
|
maintainers = with maintainers; [ OPNA2608 dotlambda ];
|
2021-02-05 17:12:51 +00:00
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|