2021-12-06 16:07:01 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
2020-04-24 23:36:52 +00:00
|
|
|
, fetchFromGitHub
|
2024-04-21 15:54:59 +00:00
|
|
|
, fetchpatch
|
2020-08-20 17:08:02 +00:00
|
|
|
, nix-update-script
|
2020-04-24 23:36:52 +00:00
|
|
|
, meson
|
|
|
|
, ninja
|
2021-02-05 17:12:51 +00:00
|
|
|
, pkg-config
|
2021-10-28 06:52:43 +00:00
|
|
|
, vala
|
2020-04-24 23:36:52 +00:00
|
|
|
, desktop-file-utils
|
|
|
|
, gtk3
|
|
|
|
, libexif
|
|
|
|
, libgee
|
2021-07-16 19:40:57 +00:00
|
|
|
, libhandy
|
2024-04-21 15:54:59 +00:00
|
|
|
, geocode-glib_2
|
2020-04-24 23:36:52 +00:00
|
|
|
, gexiv2
|
|
|
|
, libgphoto2
|
|
|
|
, granite
|
|
|
|
, gst_all_1
|
|
|
|
, libgudev
|
|
|
|
, libraw
|
|
|
|
, sqlite
|
|
|
|
, python3
|
|
|
|
, libwebp
|
|
|
|
, appstream
|
|
|
|
, wrapGAppsHook
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "elementary-photos";
|
2022-11-21 17:40:18 +00:00
|
|
|
version = "2.8.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "elementary";
|
2022-01-26 04:04:25 +00:00
|
|
|
repo = "photos";
|
2020-04-24 23:36:52 +00:00
|
|
|
rev = version;
|
2022-11-21 17:40:18 +00:00
|
|
|
sha256 = "sha256-VhJggQMy1vk21zNA5pR4uAPGCwnIxLUHVO58AZs+h6s=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
patches = [
|
|
|
|
# The following 5 patches allow building this without webkit2gtk-4.0.
|
|
|
|
# https://github.com/elementary/photos/pull/743, https://github.com/elementary/photos/pull/746
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/elementary/photos/commit/c48f49869bbf44aa37e64c0c1e25aff887783a02.patch";
|
|
|
|
hash = "sha256-CeKRONVevJqVEIchgxyPqnM16Y2zUJ1+wnL2jLdJqec=";
|
|
|
|
})
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/elementary/photos/commit/d7a8265ecb562e439d003b61b0823de8348fb10d.patch";
|
|
|
|
hash = "sha256-6M3t0l8BUhoaowUSfaiz6xjQBHliO13i+qi5cgfEY04=";
|
|
|
|
})
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/elementary/photos/commit/d8e13e8e803ed7ab1bd23527866567d998744f57.patch";
|
|
|
|
hash = "sha256-BGBDIHR5iYtd+rJG9sur1oWa4FK/lF0vLdjyPbyNbdU=";
|
|
|
|
})
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/elementary/photos/commit/075f983a65e9c6d4e80ee07f0c05309badef526a.patch";
|
|
|
|
excludes = [ ".github/workflows/ci.yml" ];
|
|
|
|
hash = "sha256-QOtssVwwHxFdtfhcVyaN33LMZdOkg/DoAC+UAbrkmDk=";
|
|
|
|
})
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/elementary/photos/commit/ea11cf23db6945df6cc3495fd698456054389371.patch";
|
|
|
|
hash = "sha256-4a/CRx7Dmyyda6SUr0QF++R73v7FBzjXfyxvspynnG0=";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
appstream
|
|
|
|
desktop-file-utils
|
|
|
|
meson
|
|
|
|
ninja
|
2021-02-05 17:12:51 +00:00
|
|
|
pkg-config
|
2020-04-24 23:36:52 +00:00
|
|
|
python3
|
2021-10-28 06:52:43 +00:00
|
|
|
vala
|
2020-04-24 23:36:52 +00:00
|
|
|
wrapGAppsHook
|
|
|
|
];
|
|
|
|
|
2022-02-10 20:34:41 +00:00
|
|
|
buildInputs = [
|
2024-04-21 15:54:59 +00:00
|
|
|
geocode-glib_2
|
2020-04-24 23:36:52 +00:00
|
|
|
gexiv2
|
|
|
|
granite
|
|
|
|
gtk3
|
|
|
|
libexif
|
|
|
|
libgee
|
|
|
|
libgphoto2
|
|
|
|
libgudev
|
2021-07-16 19:40:57 +00:00
|
|
|
libhandy
|
2020-04-24 23:36:52 +00:00
|
|
|
libraw
|
|
|
|
libwebp
|
|
|
|
sqlite
|
2022-02-10 20:34:41 +00:00
|
|
|
] ++ (with gst_all_1; [
|
|
|
|
gst-plugins-bad
|
|
|
|
gst-plugins-base
|
|
|
|
gst-plugins-good
|
|
|
|
gst-plugins-ugly
|
|
|
|
gstreamer
|
|
|
|
]);
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
chmod +x meson/post_install.py
|
|
|
|
patchShebangs meson/post_install.py
|
|
|
|
'';
|
|
|
|
|
2021-10-28 06:52:43 +00:00
|
|
|
passthru = {
|
2022-12-28 21:21:41 +00:00
|
|
|
updateScript = nix-update-script { };
|
2021-10-28 06:52:43 +00:00
|
|
|
};
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Photo viewer and organizer designed for elementary OS";
|
|
|
|
homepage = "https://github.com/elementary/photos";
|
|
|
|
license = licenses.lgpl21Plus;
|
|
|
|
platforms = platforms.linux;
|
2021-09-22 15:38:15 +00:00
|
|
|
maintainers = teams.pantheon.members;
|
2021-12-06 16:07:01 +00:00
|
|
|
mainProgram = "io.elementary.photos";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|