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:
parent
948edf8f26
commit
0703985bef
@ -94,6 +94,7 @@ in
|
|||||||
glib-networking = callInstalledTest ./glib-networking.nix {};
|
glib-networking = callInstalledTest ./glib-networking.nix {};
|
||||||
gnome-photos = callInstalledTest ./gnome-photos.nix {};
|
gnome-photos = callInstalledTest ./gnome-photos.nix {};
|
||||||
graphene = callInstalledTest ./graphene.nix {};
|
graphene = callInstalledTest ./graphene.nix {};
|
||||||
|
gsconnect = callInstalledTest ./gsconnect.nix {};
|
||||||
ibus = callInstalledTest ./ibus.nix {};
|
ibus = callInstalledTest ./ibus.nix {};
|
||||||
libgdata = callInstalledTest ./libgdata.nix {};
|
libgdata = callInstalledTest ./libgdata.nix {};
|
||||||
glib-testing = callInstalledTest ./glib-testing.nix {};
|
glib-testing = callInstalledTest ./glib-testing.nix {};
|
||||||
|
7
nixos/tests/installed-tests/gsconnect.nix
Normal file
7
nixos/tests/installed-tests/gsconnect.nix
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
{ pkgs, makeInstalledTest, ... }:
|
||||||
|
|
||||||
|
makeInstalledTest {
|
||||||
|
tested = pkgs.gnomeExtensions.gsconnect;
|
||||||
|
|
||||||
|
withX11 = true;
|
||||||
|
}
|
@ -1,16 +1,41 @@
|
|||||||
{ stdenv, fetchFromGitHub, substituteAll, python3, openssl, gsound
|
{ stdenv
|
||||||
, meson, ninja, libxml2, pkgconfig, gobject-introspection, wrapGAppsHook
|
, fetchFromGitHub
|
||||||
, glib, gtk3, at-spi2-core, upower, openssh, gnome3, gjs }:
|
, 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 {
|
stdenv.mkDerivation rec {
|
||||||
pname = "gnome-shell-gsconnect";
|
pname = "gnome-shell-gsconnect";
|
||||||
version = "41";
|
version = "43";
|
||||||
|
|
||||||
|
outputs = [ "out" "installedTests" ];
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "andyholmes";
|
owner = "andyholmes";
|
||||||
repo = "gnome-shell-extension-gsconnect";
|
repo = "gnome-shell-extension-gsconnect";
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
sha256 = "0lcj7k16jki54bsyh01j4ss4hhfddnahcw02zlmlkl637qdv1b5j";
|
sha256 = "0hm14hg4nhv9hrmjcf9dgm7dsvzpjfifihjmb6yc78y9yjw0i3v7";
|
||||||
};
|
};
|
||||||
|
|
||||||
patches = [
|
patches = [
|
||||||
@ -19,6 +44,9 @@ stdenv.mkDerivation rec {
|
|||||||
src = ./fix-paths.patch;
|
src = ./fix-paths.patch;
|
||||||
gapplication = "${glib.bin}/bin/gapplication";
|
gapplication = "${glib.bin}/bin/gapplication";
|
||||||
})
|
})
|
||||||
|
|
||||||
|
# Allow installing installed tests to a separate output
|
||||||
|
./installed-tests-path.patch
|
||||||
];
|
];
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
@ -51,11 +79,13 @@ stdenv.mkDerivation rec {
|
|||||||
"-Dsshkeygen_path=${openssh}/bin/ssh-keygen"
|
"-Dsshkeygen_path=${openssh}/bin/ssh-keygen"
|
||||||
"-Dsession_bus_services_dir=${placeholder "out"}/share/dbus-1/services"
|
"-Dsession_bus_services_dir=${placeholder "out"}/share/dbus-1/services"
|
||||||
"-Dpost_install=true"
|
"-Dpost_install=true"
|
||||||
|
"-Dinstalled_test_prefix=${placeholder ''installedTests''}"
|
||||||
];
|
];
|
||||||
|
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
patchShebangs meson/nmh.sh
|
patchShebangs meson/nmh.sh
|
||||||
patchShebangs meson/post-install.sh
|
patchShebangs meson/post-install.sh
|
||||||
|
patchShebangs installed-tests/prepare-tests.sh
|
||||||
|
|
||||||
# TODO: do not include every typelib everywhere
|
# TODO: do not include every typelib everywhere
|
||||||
# for example, we definitely do not need nautilus
|
# for example, we definitely do not need nautilus
|
||||||
@ -65,20 +95,34 @@ stdenv.mkDerivation rec {
|
|||||||
done
|
done
|
||||||
'';
|
'';
|
||||||
|
|
||||||
postFixup = ''
|
postFixup = let
|
||||||
|
testDeps = [
|
||||||
|
gtk3 harfbuzz atk pango.out gdk-pixbuf
|
||||||
|
];
|
||||||
|
in ''
|
||||||
# Let’s wrap the daemons
|
# Let’s wrap the daemons
|
||||||
for file in $out/share/gnome-shell/extensions/gsconnect@andyholmes.github.io/service/{daemon,nativeMessagingHost}.js; do
|
for file in $out/share/gnome-shell/extensions/gsconnect@andyholmes.github.io/service/{daemon,nativeMessagingHost}.js; do
|
||||||
echo "Wrapping program $file"
|
echo "Wrapping program $file"
|
||||||
wrapGApp "$file"
|
wrapGApp "$file"
|
||||||
done
|
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";
|
uuid = "gsconnect@andyholmes.github.io";
|
||||||
|
|
||||||
|
passthru = {
|
||||||
|
tests = {
|
||||||
|
installedTests = nixosTests.installed-tests.gsconnect;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
description = "KDE Connect implementation for Gnome Shell";
|
description = "KDE Connect implementation for Gnome Shell";
|
||||||
homepage = "https://github.com/andyholmes/gnome-shell-extension-gsconnect/wiki";
|
homepage = "https://github.com/andyholmes/gnome-shell-extension-gsconnect/wiki";
|
||||||
license = licenses.gpl2;
|
license = licenses.gpl2Plus;
|
||||||
maintainers = with maintainers; [ etu ];
|
maintainers = with maintainers; [ etu ];
|
||||||
platforms = platforms.linux;
|
platforms = platforms.linux;
|
||||||
};
|
};
|
||||||
|
@ -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',
|
Loading…
Reference in New Issue
Block a user