Merge pull request #198257 from Atemu/spice-darwin
spice: darwin support
This commit is contained in:
commit
da3ec5a60b
@ -20,6 +20,11 @@ stdenv.mkDerivation rec {
|
|||||||
sha256 = "HckYYikXa9+p8l/Y+oLAoFi2pgwcyAfHUH7IqTwPHfg=";
|
sha256 = "HckYYikXa9+p8l/Y+oLAoFi2pgwcyAfHUH7IqTwPHfg=";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
patches = lib.optionals stdenv.isDarwin [
|
||||||
|
# The flag breaks the build on darwin and doesn't seem necessary
|
||||||
|
./no-version-script-ld-flag.patch
|
||||||
|
];
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
pkg-config
|
pkg-config
|
||||||
gobject-introspection
|
gobject-introspection
|
||||||
@ -46,8 +51,8 @@ stdenv.mkDerivation rec {
|
|||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
homepage = "https://gitlab.gnome.org/GNOME/libgovirt";
|
homepage = "https://gitlab.gnome.org/GNOME/libgovirt";
|
||||||
description = "GObject wrapper for the oVirt REST API";
|
description = "GObject wrapper for the oVirt REST API";
|
||||||
maintainers = [ maintainers.amarshall ];
|
maintainers = with maintainers; [ amarshall atemu ];
|
||||||
platforms = platforms.linux;
|
platforms = with platforms; linux ++ darwin;
|
||||||
license = licenses.lgpl21Plus;
|
license = licenses.lgpl21Plus;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,14 @@
|
|||||||
|
--- a/govirt/Makefile.in
|
||||||
|
+++ b/govirt/Makefile.in
|
||||||
|
@@ -511,8 +511,7 @@
|
||||||
|
libgovirt_la_LDFLAGS = \
|
||||||
|
-version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
|
||||||
|
-export-dynamic \
|
||||||
|
- -no-undefined \
|
||||||
|
- -Wl,--version-script=$(srcdir)/govirt.sym
|
||||||
|
+ -no-undefined
|
||||||
|
|
||||||
|
libgovirt_la_CFLAGS = \
|
||||||
|
$(WARNINGFLAGS_C)
|
||||||
|
|
||||||
|
Diff finished. Fri Oct 28 10:36:38 2022
|
@ -14,7 +14,7 @@
|
|||||||
, gtkSupport ? !stdenv.isDarwin && !xenSupport && !nixosTestRunner, gtk3, gettext, vte, wrapGAppsHook
|
, gtkSupport ? !stdenv.isDarwin && !xenSupport && !nixosTestRunner, gtk3, gettext, vte, wrapGAppsHook
|
||||||
, vncSupport ? !nixosTestRunner, libjpeg, libpng
|
, vncSupport ? !nixosTestRunner, libjpeg, libpng
|
||||||
, smartcardSupport ? !nixosTestRunner, libcacard
|
, smartcardSupport ? !nixosTestRunner, libcacard
|
||||||
, spiceSupport ? !stdenv.isDarwin && !nixosTestRunner, spice, spice-protocol
|
, spiceSupport ? true && !nixosTestRunner, spice, spice-protocol
|
||||||
, ncursesSupport ? !nixosTestRunner, ncurses
|
, ncursesSupport ? !nixosTestRunner, ncurses
|
||||||
, usbredirSupport ? spiceSupport, usbredir
|
, usbredirSupport ? spiceSupport, usbredir
|
||||||
, xenSupport ? false, xen
|
, xenSupport ? false, xen
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
|
|
||||||
assert spiceSupport -> (
|
assert spiceSupport -> (
|
||||||
gdbm != null
|
gdbm != null
|
||||||
&& libcap != null
|
&& (stdenv.isLinux -> libcap != null)
|
||||||
&& spice-gtk_libsoup2 != null
|
&& spice-gtk_libsoup2 != null
|
||||||
&& spice-protocol != null
|
&& spice-protocol != null
|
||||||
);
|
);
|
||||||
@ -76,12 +76,13 @@ stdenv.mkDerivation rec {
|
|||||||
libvirt-glib
|
libvirt-glib
|
||||||
libxml2
|
libxml2
|
||||||
vte
|
vte
|
||||||
] ++ optionals spiceSupport [
|
] ++ optionals spiceSupport ([
|
||||||
gdbm
|
gdbm
|
||||||
libcap
|
|
||||||
spice-gtk_libsoup2
|
spice-gtk_libsoup2
|
||||||
spice-protocol
|
spice-protocol
|
||||||
];
|
] ++ optionals stdenv.isLinux [
|
||||||
|
libcap
|
||||||
|
]);
|
||||||
|
|
||||||
# Required for USB redirection PolicyKit rules file
|
# Required for USB redirection PolicyKit rules file
|
||||||
propagatedUserEnvPkgs = optional spiceSupport spice-gtk_libsoup2;
|
propagatedUserEnvPkgs = optional spiceSupport spice-gtk_libsoup2;
|
||||||
@ -94,8 +95,8 @@ stdenv.mkDerivation rec {
|
|||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
description = "A viewer for remote virtual machines";
|
description = "A viewer for remote virtual machines";
|
||||||
maintainers = [ maintainers.raskin ];
|
maintainers = with maintainers; [ raskin atemu ];
|
||||||
platforms = platforms.linux;
|
platforms = with platforms; linux ++ darwin;
|
||||||
license = licenses.gpl2;
|
license = licenses.gpl2;
|
||||||
};
|
};
|
||||||
passthru = {
|
passthru = {
|
||||||
|
@ -22,6 +22,7 @@
|
|||||||
, libopus
|
, libopus
|
||||||
, gst_all_1
|
, gst_all_1
|
||||||
, orc
|
, orc
|
||||||
|
, gdk-pixbuf
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
@ -43,6 +44,9 @@ stdenv.mkDerivation rec {
|
|||||||
sha256 = "1xd0xffw0g5vvwbq4ksmm3jjfq45f9dw20xpmi82g1fj9f7wy85k";
|
sha256 = "1xd0xffw0g5vvwbq4ksmm3jjfq45f9dw20xpmi82g1fj9f7wy85k";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
patches = [
|
||||||
|
./remove-rt-on-darwin.patch
|
||||||
|
];
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
install ${doxygen_sh} doxygen.sh
|
install ${doxygen_sh} doxygen.sh
|
||||||
patchShebangs build-aux
|
patchShebangs build-aux
|
||||||
@ -65,7 +69,6 @@ stdenv.mkDerivation rec {
|
|||||||
];
|
];
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
alsa-lib
|
|
||||||
cyrus_sasl
|
cyrus_sasl
|
||||||
glib
|
glib
|
||||||
gst_all_1.gst-plugins-base
|
gst_all_1.gst-plugins-base
|
||||||
@ -84,6 +87,10 @@ stdenv.mkDerivation rec {
|
|||||||
python3.pkgs.pyparsing
|
python3.pkgs.pyparsing
|
||||||
spice-protocol
|
spice-protocol
|
||||||
zlib
|
zlib
|
||||||
|
] ++ lib.optionals stdenv.isLinux [
|
||||||
|
alsa-lib
|
||||||
|
] ++ lib.optionals stdenv.isDarwin [
|
||||||
|
gdk-pixbuf
|
||||||
];
|
];
|
||||||
|
|
||||||
NIX_CFLAGS_COMPILE = "-fno-stack-protector";
|
NIX_CFLAGS_COMPILE = "-fno-stack-protector";
|
||||||
@ -108,7 +115,7 @@ stdenv.mkDerivation rec {
|
|||||||
homepage = "https://www.spice-space.org/";
|
homepage = "https://www.spice-space.org/";
|
||||||
license = licenses.lgpl21;
|
license = licenses.lgpl21;
|
||||||
|
|
||||||
maintainers = [ maintainers.bluescreen303 ];
|
maintainers = with maintainers; [ bluescreen303 atemu ];
|
||||||
platforms = platforms.linux;
|
platforms = with platforms; linux ++ darwin;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
18
pkgs/development/libraries/spice/remove-rt-on-darwin.patch
Normal file
18
pkgs/development/libraries/spice/remove-rt-on-darwin.patch
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
--- a/meson.build
|
||||||
|
+++ b/meson.build
|
||||||
|
@@ -103,11 +103,11 @@
|
||||||
|
spice_server_deps += dependency(dep)
|
||||||
|
endforeach
|
||||||
|
|
||||||
|
-if host_machine.system() != 'windows'
|
||||||
|
+if (host_machine.system() != 'windows' and host_machine.system() != 'darwin')
|
||||||
|
foreach dep : ['rt', 'm']
|
||||||
|
spice_server_deps += compiler.find_library(dep)
|
||||||
|
endforeach
|
||||||
|
-else
|
||||||
|
+elif host_machine.system() == 'windows'
|
||||||
|
foreach dep : ['ws2_32', 'shlwapi']
|
||||||
|
spice_server_deps += compiler.find_library(dep)
|
||||||
|
endforeach
|
||||||
|
|
||||||
|
Diff finished. Sun Oct 16 06:09:35 2022
|
Loading…
Reference in New Issue
Block a user