2020-01-24 13:45:11 +01:00
|
|
|
|
{ stdenv, fetchFromGitHub, substituteAll, python3, openssl, gsound
|
2018-09-20 22:31:51 +02:00
|
|
|
|
, meson, ninja, libxml2, pkgconfig, gobject-introspection, wrapGAppsHook
|
2019-11-05 00:38:42 +01:00
|
|
|
|
, glib, gtk3, at-spi2-core, upower, openssh, gnome3, gjs }:
|
2018-09-20 22:31:51 +02:00
|
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 14:41:18 +02:00
|
|
|
|
pname = "gnome-shell-gsconnect";
|
2020-07-31 10:19:08 +02:00
|
|
|
|
version = "39";
|
2018-09-20 22:31:51 +02:00
|
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
|
owner = "andyholmes";
|
|
|
|
|
repo = "gnome-shell-extension-gsconnect";
|
|
|
|
|
rev = "v${version}";
|
2020-07-31 10:19:08 +02:00
|
|
|
|
sha256 = "0d2wypf36p95v756arf06gfilpb48gp55i1xbqnqvcd10n3q4zc2";
|
2018-09-20 22:31:51 +02:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
patches = [
|
|
|
|
|
# Make typelibs available in the extension
|
|
|
|
|
(substituteAll {
|
|
|
|
|
src = ./fix-paths.patch;
|
|
|
|
|
gapplication = "${glib.bin}/bin/gapplication";
|
|
|
|
|
})
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
|
meson ninja pkgconfig
|
|
|
|
|
gobject-introspection # for locating typelibs
|
|
|
|
|
wrapGAppsHook # for wrapping daemons
|
|
|
|
|
libxml2 # xmllint
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
|
glib # libgobject
|
|
|
|
|
gtk3
|
|
|
|
|
at-spi2-core # atspi
|
|
|
|
|
gnome3.nautilus # TODO: this contaminates the package with nautilus and gnome-autoar typelibs but it is only needed for the extension
|
|
|
|
|
gnome3.nautilus-python
|
2019-03-10 02:10:28 +01:00
|
|
|
|
gsound
|
2018-09-20 22:31:51 +02:00
|
|
|
|
upower
|
|
|
|
|
gnome3.caribou
|
2019-11-05 00:38:42 +01:00
|
|
|
|
gjs # for running daemon
|
2019-09-10 05:10:51 +02:00
|
|
|
|
gnome3.evolution-data-server # for libebook-contacts typelib
|
2018-09-20 22:31:51 +02:00
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
mesonFlags = [
|
|
|
|
|
"-Dgnome_shell_libdir=${gnome3.gnome-shell}/lib"
|
2019-08-26 09:44:25 +02:00
|
|
|
|
"-Dgsettings_schemadir=${glib.makeSchemaPath (placeholder "out") "${pname}-${version}"}"
|
2018-09-20 22:31:51 +02:00
|
|
|
|
"-Dchrome_nmhdir=${placeholder "out"}/etc/opt/chrome/native-messaging-hosts"
|
|
|
|
|
"-Dchromium_nmhdir=${placeholder "out"}/etc/chromium/native-messaging-hosts"
|
|
|
|
|
"-Dopenssl_path=${openssl}/bin/openssl"
|
|
|
|
|
"-Dsshadd_path=${openssh}/bin/ssh-add"
|
|
|
|
|
"-Dsshkeygen_path=${openssh}/bin/ssh-keygen"
|
2020-02-11 17:01:25 +01:00
|
|
|
|
"-Dsession_bus_services_dir=${placeholder "out"}/share/dbus-1/services"
|
2018-09-20 22:31:51 +02:00
|
|
|
|
"-Dpost_install=true"
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
|
patchShebangs meson/nmh.sh
|
|
|
|
|
patchShebangs meson/post-install.sh
|
|
|
|
|
|
|
|
|
|
# TODO: do not include every typelib everywhere
|
|
|
|
|
# for example, we definitely do not need nautilus
|
|
|
|
|
for file in src/extension.js src/prefs.js; do
|
|
|
|
|
substituteInPlace "$file" \
|
|
|
|
|
--subst-var-by typelibPath "$GI_TYPELIB_PATH"
|
|
|
|
|
done
|
|
|
|
|
'';
|
|
|
|
|
|
|
|
|
|
postFixup = ''
|
|
|
|
|
# Let’s wrap the daemons
|
2020-01-24 13:45:11 +01:00
|
|
|
|
for file in $out/share/gnome-shell/extensions/gsconnect@andyholmes.github.io/service/{daemon,nativeMessagingHost}.js; do
|
2019-09-22 09:38:09 +02:00
|
|
|
|
echo "Wrapping program $file"
|
|
|
|
|
wrapGApp "$file"
|
2018-09-20 22:31:51 +02:00
|
|
|
|
done
|
|
|
|
|
'';
|
|
|
|
|
|
2018-08-30 11:09:58 +02:00
|
|
|
|
uuid = "gsconnect@andyholmes.github.io";
|
|
|
|
|
|
2018-09-20 22:31:51 +02:00
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
|
description = "KDE Connect implementation for Gnome Shell";
|
2020-04-01 03:11:51 +02:00
|
|
|
|
homepage = "https://github.com/andyholmes/gnome-shell-extension-gsconnect/wiki";
|
2018-09-20 22:31:51 +02:00
|
|
|
|
license = licenses.gpl2;
|
|
|
|
|
maintainers = with maintainers; [ etu ];
|
|
|
|
|
platforms = platforms.linux;
|
|
|
|
|
};
|
|
|
|
|
}
|