gnomeExtensions.gsconnect: 41 → 43

https://github.com/andyholmes/gnome-shell-extension-gsconnect/releases/tag/v42
https://github.com/andyholmes/gnome-shell-extension-gsconnect/releases/tag/v43

- Added installed tests.
- Corrected license.
This commit is contained in:
Jan Tojnar 2020-10-13 22:57:48 +02:00
parent 948edf8f26
commit 0703985bef
No known key found for this signature in database
GPG Key ID: 7FAB2A15F7A607A4
4 changed files with 89 additions and 7 deletions

View File

@ -94,6 +94,7 @@ in
glib-networking = callInstalledTest ./glib-networking.nix {};
gnome-photos = callInstalledTest ./gnome-photos.nix {};
graphene = callInstalledTest ./graphene.nix {};
gsconnect = callInstalledTest ./gsconnect.nix {};
ibus = callInstalledTest ./ibus.nix {};
libgdata = callInstalledTest ./libgdata.nix {};
glib-testing = callInstalledTest ./glib-testing.nix {};

View File

@ -0,0 +1,7 @@
{ pkgs, makeInstalledTest, ... }:
makeInstalledTest {
tested = pkgs.gnomeExtensions.gsconnect;
withX11 = true;
}

View File

@ -1,16 +1,41 @@
{ stdenv, fetchFromGitHub, substituteAll, python3, openssl, gsound
, meson, ninja, libxml2, pkgconfig, gobject-introspection, wrapGAppsHook
, glib, gtk3, at-spi2-core, upower, openssh, gnome3, gjs }:
{ stdenv
, fetchFromGitHub
, substituteAll
, python3
, openssl
, gsound
, meson
, ninja
, libxml2
, pkgconfig
, gobject-introspection
, wrapGAppsHook
, glib
, gtk3
, at-spi2-core
, upower
, openssh
, gnome3
, gjs
, nixosTests
, atk
, harfbuzz
, pango
, gdk-pixbuf
, gsettings-desktop-schemas
}:
stdenv.mkDerivation rec {
pname = "gnome-shell-gsconnect";
version = "41";
version = "43";
outputs = [ "out" "installedTests" ];
src = fetchFromGitHub {
owner = "andyholmes";
repo = "gnome-shell-extension-gsconnect";
rev = "v${version}";
sha256 = "0lcj7k16jki54bsyh01j4ss4hhfddnahcw02zlmlkl637qdv1b5j";
sha256 = "0hm14hg4nhv9hrmjcf9dgm7dsvzpjfifihjmb6yc78y9yjw0i3v7";
};
patches = [
@ -19,6 +44,9 @@ stdenv.mkDerivation rec {
src = ./fix-paths.patch;
gapplication = "${glib.bin}/bin/gapplication";
})
# Allow installing installed tests to a separate output
./installed-tests-path.patch
];
nativeBuildInputs = [
@ -51,11 +79,13 @@ stdenv.mkDerivation rec {
"-Dsshkeygen_path=${openssh}/bin/ssh-keygen"
"-Dsession_bus_services_dir=${placeholder "out"}/share/dbus-1/services"
"-Dpost_install=true"
"-Dinstalled_test_prefix=${placeholder ''installedTests''}"
];
postPatch = ''
patchShebangs meson/nmh.sh
patchShebangs meson/post-install.sh
patchShebangs installed-tests/prepare-tests.sh
# TODO: do not include every typelib everywhere
# for example, we definitely do not need nautilus
@ -65,20 +95,34 @@ stdenv.mkDerivation rec {
done
'';
postFixup = ''
postFixup = let
testDeps = [
gtk3 harfbuzz atk pango.out gdk-pixbuf
];
in ''
# Lets wrap the daemons
for file in $out/share/gnome-shell/extensions/gsconnect@andyholmes.github.io/service/{daemon,nativeMessagingHost}.js; do
echo "Wrapping program $file"
wrapGApp "$file"
done
wrapProgram "$installedTests/libexec/installed-tests/gsconnect/minijasmine" \
--prefix XDG_DATA_DIRS : "${gsettings-desktop-schemas}/share/gsettings-schemas/${gsettings-desktop-schemas.name}" \
--prefix GI_TYPELIB_PATH : "${stdenv.lib.makeSearchPath "lib/girepository-1.0" testDeps}"
'';
uuid = "gsconnect@andyholmes.github.io";
passthru = {
tests = {
installedTests = nixosTests.installed-tests.gsconnect;
};
};
meta = with stdenv.lib; {
description = "KDE Connect implementation for Gnome Shell";
homepage = "https://github.com/andyholmes/gnome-shell-extension-gsconnect/wiki";
license = licenses.gpl2;
license = licenses.gpl2Plus;
maintainers = with maintainers; [ etu ];
platforms = platforms.linux;
};

View File

@ -0,0 +1,30 @@
diff --git a/installed-tests/meson.build b/installed-tests/meson.build
index c7eff2fb..ef4f6052 100644
--- a/installed-tests/meson.build
+++ b/installed-tests/meson.build
@@ -1,5 +1,5 @@
-installed_tests_execdir = join_paths(libexecdir, 'installed-tests', meson.project_name())
-installed_tests_metadir = join_paths(datadir, 'installed-tests', meson.project_name())
+installed_tests_execdir = join_paths(get_option('installed_test_prefix'), 'libexec', 'installed-tests', meson.project_name())
+installed_tests_metadir = join_paths(get_option('installed_test_prefix'), 'share', 'installed-tests', meson.project_name())
installed_tests_srcdir = meson.current_source_dir()
installed_tests_builddir = meson.current_build_dir()
diff --git a/meson_options.txt b/meson_options.txt
index 8912e052..ca6ee5eb 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -116,6 +116,13 @@ option(
description: 'Native Messaging Host directory for Mozilla'
)
+option(
+ 'installed_test_prefix',
+ type: 'string',
+ value: '',
+ description: 'Prefix for installed tests'
+)
+
option(
'installed_tests',
type: 'boolean',