diff options
author | Sandro <sandro.jaeckel@gmail.com> | 2021-01-19 00:32:00 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-19 00:32:00 +0100 |
commit | f97266e94217712a3560a1f66dc1009964794913 (patch) | |
tree | 30d886b6c3e52299982932688d1526014b8a8c1d /pkgs/applications | |
parent | fa691328032fab029a1890fa0b823302bfa78a33 (diff) | |
parent | 1ae6b4c2ee29e020007fa263e8df99aeb4041bdd (diff) |
Merge pull request #98479 from OPNA2608/package-megapixels
megapixels: init at 0.14.0
Diffstat (limited to 'pkgs/applications')
-rw-r--r-- | pkgs/applications/graphics/megapixels/default.nix | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/pkgs/applications/graphics/megapixels/default.nix b/pkgs/applications/graphics/megapixels/default.nix new file mode 100644 index 000000000000..29aaed1278d5 --- /dev/null +++ b/pkgs/applications/graphics/megapixels/default.nix @@ -0,0 +1,55 @@ +{ stdenv +, lib +, fetchgit +, meson +, ninja +, pkg-config +, wrapGAppsHook +, gtk3 +, gnome3 +, tiffSupport ? true +, libraw +, jpgSupport ? true +, imagemagick +, exiftool +}: + +assert jpgSupport -> tiffSupport; + +let + inherit (lib) makeBinPath optional optionals optionalString; + runtimePath = makeBinPath ( + optional tiffSupport libraw + ++ optionals jpgSupport [ imagemagick exiftool ] + ); +in +stdenv.mkDerivation rec { + pname = "megapixels"; + version = "0.14.0"; + + src = fetchgit { + url = "https://git.sr.ht/~martijnbraam/megapixels"; + rev = version; + sha256 = "136rv9sx0kgfkpqn5s90j7j4qhb8h04p14g5qhqshb89kmmsmxiw"; + }; + + nativeBuildInputs = [ meson ninja pkg-config wrapGAppsHook ]; + + buildInputs = [ gtk3 gnome3.adwaita-icon-theme ] + ++ optional tiffSupport libraw + ++ optional jpgSupport imagemagick; + + 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"; + license = licenses.gpl3Only; + maintainers = with maintainers; [ OPNA2608 ]; + platforms = platforms.linux; + }; +} |