From e529ec326338f660d14fa220b8440d5613d464a0 Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Wed, 19 Jun 2019 03:17:42 +0200 Subject: [PATCH 01/14] meson: enable auto_features by default We disabled them by default when they were introduced in https://github.com/NixOS/nixpkgs/pull/42994 but enabling them probably makes more sense: https://github.com/NixOS/nixpkgs/pull/54398 https://github.com/NixOS/nixpkgs/pull/63491 --- pkgs/development/tools/build-managers/meson/setup-hook.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/tools/build-managers/meson/setup-hook.sh b/pkgs/development/tools/build-managers/meson/setup-hook.sh index 06375c1528e0..7e2da2077e37 100644 --- a/pkgs/development/tools/build-managers/meson/setup-hook.sh +++ b/pkgs/development/tools/build-managers/meson/setup-hook.sh @@ -17,7 +17,7 @@ mesonConfigurePhase() { --includedir=${!outputInclude}/include \ --mandir=${!outputMan}/share/man --infodir=${!outputInfo}/share/info \ --localedir=${!outputLib}/share/locale \ - -Dauto_features=disabled \ + -Dauto_features=${mesonAutoFeatures:-enabled} \ $mesonFlags" mesonFlags="${crossMesonFlags+$crossMesonFlags }--buildtype=${mesonBuildType:-release} $mesonFlags" From 0fd5abb213bd334214ae8145e35e19c3a65d46c5 Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Wed, 19 Jun 2019 03:47:25 +0200 Subject: [PATCH 02/14] meson: do not download wraps --- pkgs/development/tools/build-managers/meson/setup-hook.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/development/tools/build-managers/meson/setup-hook.sh b/pkgs/development/tools/build-managers/meson/setup-hook.sh index 7e2da2077e37..ab4b27e3bf6f 100644 --- a/pkgs/development/tools/build-managers/meson/setup-hook.sh +++ b/pkgs/development/tools/build-managers/meson/setup-hook.sh @@ -18,6 +18,7 @@ mesonConfigurePhase() { --mandir=${!outputMan}/share/man --infodir=${!outputInfo}/share/info \ --localedir=${!outputLib}/share/locale \ -Dauto_features=${mesonAutoFeatures:-enabled} \ + -Dwrap_mode=${mesonWrapMode:-nodownload} \ $mesonFlags" mesonFlags="${crossMesonFlags+$crossMesonFlags }--buildtype=${mesonBuildType:-release} $mesonFlags" From 41c575b6fc52af1a3fb25f6d527c2b5e0dcc11b6 Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Wed, 19 Jun 2019 03:48:05 +0200 Subject: [PATCH 03/14] meson: use plain buildtype This should allow us to inherit optimization/striping from stdenv --- pkgs/development/tools/build-managers/meson/setup-hook.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/tools/build-managers/meson/setup-hook.sh b/pkgs/development/tools/build-managers/meson/setup-hook.sh index ab4b27e3bf6f..6e8d94523e14 100644 --- a/pkgs/development/tools/build-managers/meson/setup-hook.sh +++ b/pkgs/development/tools/build-managers/meson/setup-hook.sh @@ -21,7 +21,7 @@ mesonConfigurePhase() { -Dwrap_mode=${mesonWrapMode:-nodownload} \ $mesonFlags" - mesonFlags="${crossMesonFlags+$crossMesonFlags }--buildtype=${mesonBuildType:-release} $mesonFlags" + mesonFlags="${crossMesonFlags+$crossMesonFlags }--buildtype=${mesonBuildType:-plain} $mesonFlags" echo "meson flags: $mesonFlags ${mesonFlagsArray[@]}" From 76d85e4a6fdcacf9fd4b299b189cad84e9f6bdc0 Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Mon, 24 Jun 2019 16:44:08 +0200 Subject: [PATCH 04/14] gnome3.gnome-desktop: add libudev --- pkgs/desktops/gnome-3/core/gnome-desktop/default.nix | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/pkgs/desktops/gnome-3/core/gnome-desktop/default.nix b/pkgs/desktops/gnome-3/core/gnome-desktop/default.nix index 2e6bb44b874f..4beeb190f025 100644 --- a/pkgs/desktops/gnome-3/core/gnome-desktop/default.nix +++ b/pkgs/desktops/gnome-3/core/gnome-desktop/default.nix @@ -1,6 +1,6 @@ { stdenv, fetchurl, substituteAll, pkgconfig, libxslt, ninja, libX11, gnome3, gtk3, glib , gettext, libxml2, xkeyboard_config, isocodes, meson, wayland -, libseccomp, bubblewrap, gobject-introspection, gtk-doc, docbook_xsl, gsettings-desktop-schemas }: +, libseccomp, systemd, bubblewrap, gobject-introspection, gtk-doc, docbook_xsl, gsettings-desktop-schemas }: stdenv.mkDerivation rec { name = "gnome-desktop-${version}"; @@ -13,15 +13,13 @@ stdenv.mkDerivation rec { sha256 = "0bidx4626x7k2myv6f64qv4fzmxv8v475wibiz19kj8hjfr737q9"; }; - enableParallelBuilding = true; - nativeBuildInputs = [ pkgconfig meson ninja gettext libxslt libxml2 gobject-introspection gtk-doc docbook_xsl ]; buildInputs = [ libX11 bubblewrap xkeyboard_config isocodes wayland - gtk3 glib libseccomp + gtk3 glib libseccomp systemd ]; propagatedBuildInputs = [ gsettings-desktop-schemas ]; From 4fa19ba151e475f289c00d2c2f034e4e512dc064 Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Mon, 24 Jun 2019 16:45:30 +0200 Subject: [PATCH 05/14] gnome3.tracker-miners: do not add auto_features=enabled Meson setup hook now defaults to this. --- pkgs/desktops/gnome-3/core/tracker-miners/default.nix | 1 - 1 file changed, 1 deletion(-) diff --git a/pkgs/desktops/gnome-3/core/tracker-miners/default.nix b/pkgs/desktops/gnome-3/core/tracker-miners/default.nix index 66aeff1bf4de..eaa3ab3c089b 100644 --- a/pkgs/desktops/gnome-3/core/tracker-miners/default.nix +++ b/pkgs/desktops/gnome-3/core/tracker-miners/default.nix @@ -104,7 +104,6 @@ stdenv.mkDerivation rec { "-Dfunctional_tests=false" "-Ddbus_services=${placeholder "out"}/share/dbus-1/services" "-Dsystemd_user_services=${placeholder "out"}/lib/systemd/user" - "-Dauto_features=enabled" ]; patches = [ From 3238567677df5fc0faa3aa4353b260d157e16b19 Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Mon, 24 Jun 2019 17:01:21 +0200 Subject: [PATCH 06/14] girara: fix build with auto_features=enabled Also split multiple outputs and enable tests. --- pkgs/applications/misc/girara/default.nix | 25 ++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/pkgs/applications/misc/girara/default.nix b/pkgs/applications/misc/girara/default.nix index 919f20f13983..977bd17fb511 100644 --- a/pkgs/applications/misc/girara/default.nix +++ b/pkgs/applications/misc/girara/default.nix @@ -1,19 +1,34 @@ -{ stdenv, fetchurl, meson, ninja, pkgconfig, glib, gtk, gettext, libiconv, libintl +{ stdenv, fetchurl, meson, ninja, pkgconfig, check, dbus, xvfb_run, glib, gtk, gettext, libiconv, json_c, libintl }: stdenv.mkDerivation rec { - name = "girara-${version}"; + pname = "girara"; version = "0.3.2"; + outputs = [ "out" "dev" ]; + src = fetchurl { - url = "https://pwmt.org/projects/girara/download/${name}.tar.xz"; + url = "https://pwmt.org/projects/girara/download/${pname}-${version}.tar.xz"; sha256 = "1kc6n1mxjxa7wvwnqy94qfg8l9jvx9qrvrr2kc7m4g0z20x3a00p"; }; - nativeBuildInputs = [ meson ninja pkgconfig gettext ]; - buildInputs = [ libintl libiconv ]; + nativeBuildInputs = [ meson ninja pkgconfig gettext check dbus xvfb_run ]; + buildInputs = [ libintl libiconv json_c ]; propagatedBuildInputs = [ glib gtk ]; + doCheck = true; + + mesonFlags = [ + "-Ddocs=disabled" # docs do not seem to be installed + ]; + + checkPhase = '' + export NO_AT_BRIDGE=1 + xvfb-run -s '-screen 0 800x600x24' dbus-run-session \ + --config-file=${dbus.daemon}/share/dbus-1/session.conf \ + meson test --print-errorlogs + ''; + meta = with stdenv.lib; { homepage = https://pwmt.org/projects/girara/; description = "User interface library"; From 592a52021d3650e931fe52d50e3a45d93b67b376 Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Mon, 24 Jun 2019 17:03:56 +0200 Subject: [PATCH 07/14] grim: fix build with auto_features=enabled --- pkgs/tools/graphics/grim/default.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/tools/graphics/grim/default.nix b/pkgs/tools/graphics/grim/default.nix index b84f498fa2f0..667a5b38d3ed 100644 --- a/pkgs/tools/graphics/grim/default.nix +++ b/pkgs/tools/graphics/grim/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchFromGitHub, cairo, libjpeg, meson, ninja, wayland, pkgconfig, wayland-protocols }: +{ stdenv, fetchFromGitHub, cairo, libjpeg, meson, ninja, wayland, pkgconfig, scdoc, wayland-protocols }: stdenv.mkDerivation rec { pname = "grim"; @@ -15,6 +15,7 @@ stdenv.mkDerivation rec { meson ninja pkgconfig + scdoc ]; buildInputs = [ From 5779747af450d801a2a838ef73c0c74d6759a3b6 Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Mon, 24 Jun 2019 17:06:05 +0200 Subject: [PATCH 08/14] wlroots: fix build with auto_features=enabled --- pkgs/development/libraries/wlroots/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/wlroots/default.nix b/pkgs/development/libraries/wlroots/default.nix index 46b24467af9d..b85616842ea6 100644 --- a/pkgs/development/libraries/wlroots/default.nix +++ b/pkgs/development/libraries/wlroots/default.nix @@ -1,7 +1,7 @@ { stdenv, fetchFromGitHub, meson, ninja, pkgconfig , wayland, libGL, wayland-protocols, libinput, libxkbcommon, pixman , xcbutilwm, libX11, libcap, xcbutilimage, xcbutilerrors, mesa -, libpng, ffmpeg_4 +, libpng, ffmpeg_4, freerdp }: stdenv.mkDerivation rec { @@ -24,7 +24,7 @@ stdenv.mkDerivation rec { buildInputs = [ wayland libGL wayland-protocols libinput libxkbcommon pixman xcbutilwm libX11 libcap xcbutilimage xcbutilerrors mesa - libpng ffmpeg_4 + libpng ffmpeg_4 freerdp ]; mesonFlags = [ From 4abfebf1feecab01e98706cac64d248995c03863 Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Mon, 24 Jun 2019 17:08:41 +0200 Subject: [PATCH 09/14] ncmpc: fix build with auto_features=enabled --- pkgs/applications/audio/ncmpc/default.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkgs/applications/audio/ncmpc/default.nix b/pkgs/applications/audio/ncmpc/default.nix index 67fe983c26fd..a35d9c670fe8 100644 --- a/pkgs/applications/audio/ncmpc/default.nix +++ b/pkgs/applications/audio/ncmpc/default.nix @@ -15,6 +15,12 @@ stdenv.mkDerivation rec { buildInputs = [ glib ncurses mpd_clientlib boost ]; nativeBuildInputs = [ meson ninja pkgconfig gettext ]; + mesonFlags = [ + "-Dlirc=disabled" + "-Dregex=disabled" + "-Ddocumentation=disabled" + ]; + meta = with stdenv.lib; { description = "Curses-based interface for MPD (music player daemon)"; homepage = https://www.musicpd.org/clients/ncmpc/; From 4bc87ff3657e06f0b98cdedaf2237b5854304cce Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Tue, 25 Jun 2019 17:48:32 +0200 Subject: [PATCH 10/14] zathura: fix build with auto_features=enabled --- pkgs/applications/misc/zathura/core/default.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/misc/zathura/core/default.nix b/pkgs/applications/misc/zathura/core/default.nix index 3a53f7174ac8..835b408dca21 100644 --- a/pkgs/applications/misc/zathura/core/default.nix +++ b/pkgs/applications/misc/zathura/core/default.nix @@ -1,6 +1,6 @@ { stdenv, fetchurl, meson, ninja, wrapGAppsHook, pkgconfig , appstream-glib, desktop-file-utils, python3 -, gtk, girara, gettext, libxml2 +, gtk, girara, gettext, libxml2, check , sqlite, glib, texlive, libintl, libseccomp , file, librsvg , gtk-mac-integration, synctexSupport ? true @@ -33,7 +33,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ meson ninja pkgconfig desktop-file-utils python3.pkgs.sphinx - gettext wrapGAppsHook libxml2 + gettext wrapGAppsHook libxml2 check ] ++ optional stdenv.isLinux appstream-glib; buildInputs = [ @@ -42,6 +42,8 @@ stdenv.mkDerivation rec { ++ optional stdenv.isLinux libseccomp ++ optional stdenv.isDarwin gtk-mac-integration; + doCheck = true; + meta = { homepage = https://pwmt.org/projects/zathura/; description = "A core component for zathura PDF viewer"; From c3fe79e9305f36affc68e5af737700e3d4542d10 Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Tue, 25 Jun 2019 17:52:37 +0200 Subject: [PATCH 11/14] spice-gtk: remove auto_features=enabled from expression It is now default --- pkgs/development/libraries/spice-gtk/default.nix | 1 - 1 file changed, 1 deletion(-) diff --git a/pkgs/development/libraries/spice-gtk/default.nix b/pkgs/development/libraries/spice-gtk/default.nix index d597fd16ad07..079d61ca3d58 100644 --- a/pkgs/development/libraries/spice-gtk/default.nix +++ b/pkgs/development/libraries/spice-gtk/default.nix @@ -109,7 +109,6 @@ stdenv.mkDerivation rec { PKG_CONFIG_POLKIT_GOBJECT_1_POLICYDIR = "${placeholder "out"}/share/polkit-1/actions"; mesonFlags = [ - "-Dauto_features=enabled" "-Dcelt051=disabled" "-Dpulse=disabled" # is deprecated upstream ]; From 1811e9155d97c77a1da08ab1fbe31bb835a03ab0 Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Tue, 25 Jun 2019 17:53:38 +0200 Subject: [PATCH 12/14] wl-clipboard: remove auto_features=enabled from expression It is now the default. --- pkgs/tools/misc/wl-clipboard/default.nix | 1 - 1 file changed, 1 deletion(-) diff --git a/pkgs/tools/misc/wl-clipboard/default.nix b/pkgs/tools/misc/wl-clipboard/default.nix index 55a58185d562..00e26d762a44 100644 --- a/pkgs/tools/misc/wl-clipboard/default.nix +++ b/pkgs/tools/misc/wl-clipboard/default.nix @@ -14,7 +14,6 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ meson ninja pkgconfig wayland-protocols ]; buildInputs = [ wayland ]; - mesonFlags = [ "-Dauto_features=enabled" ]; meta = with stdenv.lib; { description = "Command-line copy/paste utilities for Wayland"; From c1d500ddd5cfa92c653ab9a05a7ca75f9e2325b6 Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Tue, 25 Jun 2019 17:54:19 +0200 Subject: [PATCH 13/14] spice: remove auto_features=enabled from expression It is now the default. --- pkgs/development/libraries/spice/default.nix | 1 - 1 file changed, 1 deletion(-) diff --git a/pkgs/development/libraries/spice/default.nix b/pkgs/development/libraries/spice/default.nix index 9e50a3b86b94..d2c4ddb8631e 100644 --- a/pkgs/development/libraries/spice/default.nix +++ b/pkgs/development/libraries/spice/default.nix @@ -77,7 +77,6 @@ stdenv.mkDerivation rec { NIX_CFLAGS_COMPILE = "-fno-stack-protector"; mesonFlags = [ - "-Dauto_features=enabled" "-Dgstreamer=1.0" "-Dcelt051=disabled" ]; From ac404cfa986af52ee831d697106428ddae596328 Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Tue, 25 Jun 2019 17:54:53 +0200 Subject: [PATCH 14/14] gnome3.evince: remove auto_features=enabled from expression It is now the default. --- pkgs/desktops/gnome-3/core/evince/default.nix | 1 - 1 file changed, 1 deletion(-) diff --git a/pkgs/desktops/gnome-3/core/evince/default.nix b/pkgs/desktops/gnome-3/core/evince/default.nix index 6e7f0716eefb..68beb0e47e35 100644 --- a/pkgs/desktops/gnome-3/core/evince/default.nix +++ b/pkgs/desktops/gnome-3/core/evince/default.nix @@ -104,7 +104,6 @@ stdenv.mkDerivation rec { gstreamer gst-plugins-base gst-plugins-good gst-plugins-bad gst-plugins-ugly gst-libav ]); mesonFlags = [ - "-Dauto_features=enabled" "-Dnautilus=false" "-Dps=enabled" "-Dgtk_doc=false"