nixpkgs/pkgs/by-name/me/megapixels/package.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

79 lines
1.5 KiB
Nix
Raw Normal View History

2021-01-14 11:38:33 +00:00
{ stdenv
, lib
2021-11-14 04:22:23 +00:00
, fetchFromGitLab
, glib
2021-01-14 11:38:33 +00:00
, meson
, ninja
, pkg-config
2022-05-18 05:02:06 +00:00
, wrapGAppsHook4
, feedbackd
, gtk4
, libepoxy
, xorg
2021-03-11 16:41:47 +00:00
, zbar
2021-01-14 11:38:33 +00:00
, tiffSupport ? true
, libraw
, jpgSupport ? true
2021-03-11 16:41:47 +00:00
, graphicsmagick
2021-01-14 11:38:33 +00:00
, exiftool
}:
assert jpgSupport -> tiffSupport;
let
inherit (lib) makeBinPath optional optionals optionalString;
runtimePath = makeBinPath (
optional tiffSupport libraw
2021-03-11 16:41:47 +00:00
++ optionals jpgSupport [ graphicsmagick exiftool ]
2021-01-14 11:38:33 +00:00
);
in
stdenv.mkDerivation (finalAttrs: {
2021-01-14 11:38:33 +00:00
pname = "megapixels";
version = "1.8.1";
2021-01-14 11:38:33 +00:00
2021-11-14 04:22:23 +00:00
src = fetchFromGitLab {
owner = "megapixels-org";
repo = "Megapixels";
rev = finalAttrs.version;
hash = "sha256-TXiPJbd4TPpsEvmD97F7xkm4rS1g+ViTVTNlxeXrQaw=";
2021-01-14 11:38:33 +00:00
};
2021-09-02 21:13:01 +00:00
nativeBuildInputs = [
2021-11-14 04:22:23 +00:00
glib
2021-09-02 21:13:01 +00:00
meson
ninja
pkg-config
2022-05-18 05:02:06 +00:00
wrapGAppsHook4
2021-09-02 21:13:01 +00:00
];
2021-01-14 11:38:33 +00:00
buildInputs = [
feedbackd
gtk4
libepoxy
xorg.libXrandr
zbar
];
2021-01-14 11:38:33 +00:00
2021-09-02 21:13:01 +00:00
postInstall = ''
glib-compile-schemas $out/share/glib-2.0/schemas
'';
2021-01-14 11:38:33 +00:00
preFixup = optionalString (tiffSupport || jpgSupport) ''
gappsWrapperArgs+=(
--prefix PATH : ${lib.escapeShellArg runtimePath}
2021-01-14 11:38:33 +00:00
)
'';
strictDeps = true;
2021-01-14 11:38:33 +00:00
meta = with lib; {
2021-08-05 20:09:01 +00:00
description = "GTK4 camera application that knows how to deal with the media request api";
homepage = "https://gitlab.com/megapixels-org/Megapixels";
changelog = "https://gitlab.com/megapixels-org/Megapixels/-/tags/${finalAttrs.version}";
2021-01-14 11:38:33 +00:00
license = licenses.gpl3Only;
2024-02-12 11:48:37 +00:00
maintainers = with maintainers; [ dotlambda Luflosi ];
2021-01-14 11:38:33 +00:00
platforms = platforms.linux;
mainProgram = "megapixels";
2021-01-14 11:38:33 +00:00
};
})