depot/third_party/nixpkgs/pkgs/desktops/pantheon/apps/elementary-photos/default.nix

119 lines
2 KiB
Nix
Raw Normal View History

{ lib, stdenv
, fetchFromGitHub
, fetchpatch
, nix-update-script
, pantheon
, meson
, ninja
, pkg-config
, vala
, desktop-file-utils
, gtk3
, libaccounts-glib
, libexif
, libgee
, libhandy
, geocode-glib
, gexiv2
, libgphoto2
, granite
, gst_all_1
, libgudev
, json-glib
, libraw
, librest
, libsoup
, sqlite
, python3
, scour
, webkitgtk
, libwebp
, appstream
, wrapGAppsHook
, elementary-icon-theme
}:
stdenv.mkDerivation rec {
pname = "elementary-photos";
version = "2.7.1";
repoName = "photos";
src = fetchFromGitHub {
owner = "elementary";
repo = repoName;
rev = version;
sha256 = "1dql14k43rv3in451amiwv4z71hz3ailx67hd8gw1ka3yw12128p";
};
patches = [
# Upstream code not respecting our localedir
# https://github.com/elementary/photos/pull/629
(fetchpatch {
url = "https://github.com/elementary/photos/commit/e5230a4305381734e93f1e3d1177da21a8a4121b.patch";
sha256 = "1igqq51sj1sx6rl8yrw037jsgnaxfwzfs0m6pqzb9q4jvfdimzfi";
})
];
passthru = {
updateScript = nix-update-script {
attrPath = "pantheon.${pname}";
};
};
nativeBuildInputs = [
appstream
desktop-file-utils
meson
ninja
pkg-config
python3
vala
wrapGAppsHook
];
buildInputs = with gst_all_1; [
elementary-icon-theme
geocode-glib
gexiv2
granite
gst-plugins-bad
gst-plugins-base
gst-plugins-good
gst-plugins-ugly
gstreamer
gtk3
json-glib
libaccounts-glib
libexif
libgee
libgphoto2
libgudev
libhandy
libraw
librest
libsoup
libwebp
scour
sqlite
webkitgtk
];
mesonFlags = [
"-Dplugins=false"
];
postPatch = ''
chmod +x meson/post_install.py
patchShebangs meson/post_install.py
'';
meta = with lib; {
description = "Photo viewer and organizer designed for elementary OS";
homepage = "https://github.com/elementary/photos";
license = licenses.lgpl21Plus;
platforms = platforms.linux;
maintainers = teams.pantheon.members;
};
}