colord: 1.4.2 -> 1.4.4

* multiple outputs
* enable all docs
* installed tests

https://github.com/hughsie/colord/blob/1.4.3/NEWS
https://github.com/hughsie/colord/blob/1.4.4/NEWS

+154 -25
+82 -25
pkgs/tools/misc/colord/default.nix
··· 1 - { stdenv, fetchurl, bash-completion 2 - , glib, polkit, pkgconfig, gettext, gusb, lcms2, sqlite, systemd, dbus 3 - , gobject-introspection, argyllcms, meson, ninja, libxml2, vala_0_40 4 - , libgudev, sane-backends, gnome3, makeWrapper }: 5 6 stdenv.mkDerivation rec { 7 - name = "colord-1.4.2"; 8 9 src = fetchurl { 10 - url = "https://www.freedesktop.org/software/colord/releases/${name}.tar.xz"; 11 - sha256 = "19zc9gldz469jshl16av7na459kwr5nhvs2pz98xm5lw582xaw2c"; 12 }; 13 14 mesonFlags = [ 15 - "-Denable-sane=true" 16 - "-Denable-vala=true" 17 "--localstatedir=/var" 18 - "-Denable-bash-completion=true" 19 - # TODO: man page cannot be build with docbook2x 20 - "-Denable-man=false" 21 - "-Denable-docs=false" 22 ]; 23 24 - nativeBuildInputs = [ meson pkgconfig vala_0_40 ninja gettext libxml2 gobject-introspection makeWrapper ]; 25 26 - buildInputs = [ glib polkit gusb lcms2 sqlite systemd dbus bash-completion argyllcms libgudev sane-backends ]; 27 28 postInstall = '' 29 glib-compile-schemas $out/share/glib-2.0/schemas ··· 35 PKG_CONFIG_BASH_COMPLETION_COMPLETIONSDIR= "${placeholder "out"}/share/bash-completion/completions"; 36 PKG_CONFIG_UDEV_UDEVDIR = "${placeholder "out"}/lib/udev"; 37 38 - postFixup = '' 39 - wrapProgram "$out/libexec/colord-session" \ 40 - --prefix XDG_DATA_DIRS : "$GSETTINGS_SCHEMAS_PATH:$out/share" \ 41 - --prefix GIO_EXTRA_MODULES : "${stdenv.lib.getLib gnome3.dconf}/lib/gio/modules" 42 - ''; 43 - 44 - meta = { 45 description = "System service to manage, install and generate color profiles to accurately color manage input and output devices"; 46 homepage = https://www.freedesktop.org/software/colord/; 47 - license = stdenv.lib.licenses.lgpl2Plus; 48 - maintainers = [stdenv.lib.maintainers.marcweber]; 49 - platforms = stdenv.lib.platforms.linux; 50 }; 51 }
··· 1 + { stdenv 2 + , fetchurl 3 + , bash-completion 4 + , glib 5 + , polkit 6 + , pkgconfig 7 + , gettext 8 + , gusb 9 + , lcms2 10 + , sqlite 11 + , systemd 12 + , dbus 13 + , gobject-introspection 14 + , argyllcms 15 + , meson 16 + , ninja 17 + , libxml2 18 + , vala 19 + , libgudev 20 + , wrapGAppsHook 21 + , shared-mime-info 22 + , sane-backends 23 + , docbook_xsl 24 + , docbook_xsl_ns 25 + , docbook_xml_dtd_412 26 + , gtk-doc 27 + , libxslt 28 + , substituteAll 29 + }: 30 31 stdenv.mkDerivation rec { 32 + pname = "colord"; 33 + version = "1.4.4"; 34 + 35 + outputs = [ "out" "dev" "devdoc" "man" "installedTests" ]; 36 37 src = fetchurl { 38 + url = "https://www.freedesktop.org/software/colord/releases/${pname}-${version}.tar.xz"; 39 + sha256 = "19f0938fr7nvvm3jr263dlknaq7md40zrac2npfyz25zc00yh3ws"; 40 }; 41 42 + patches = [ 43 + # Put installed tests into its own output 44 + ./installed-tests-path.patch 45 + ]; 46 + 47 + postPatch = '' 48 + for file in data/tests/meson.build lib/colord/cd-test-shared.c lib/colord/meson.build; do 49 + substituteInPlace $file --subst-var-by installed_tests_dir "$installedTests" 50 + done 51 + ''; 52 + 53 mesonFlags = [ 54 "--localstatedir=/var" 55 + "-Dinstalled_tests=true" 56 + "-Dlibcolordcompat=true" 57 + "-Dsane=true" 58 + "-Dvapi=true" 59 ]; 60 61 + nativeBuildInputs = [ 62 + docbook_xml_dtd_412 63 + docbook_xsl 64 + docbook_xsl_ns 65 + gettext 66 + gobject-introspection 67 + gtk-doc 68 + libxslt 69 + meson 70 + ninja 71 + pkgconfig 72 + shared-mime-info 73 + vala 74 + wrapGAppsHook 75 + ]; 76 77 + buildInputs = [ 78 + argyllcms 79 + bash-completion 80 + dbus 81 + glib 82 + gusb 83 + lcms2 84 + libgudev 85 + polkit 86 + sane-backends 87 + sqlite 88 + systemd 89 + ]; 90 91 postInstall = '' 92 glib-compile-schemas $out/share/glib-2.0/schemas ··· 98 PKG_CONFIG_BASH_COMPLETION_COMPLETIONSDIR= "${placeholder "out"}/share/bash-completion/completions"; 99 PKG_CONFIG_UDEV_UDEVDIR = "${placeholder "out"}/lib/udev"; 100 101 + meta = with stdenv.lib; { 102 description = "System service to manage, install and generate color profiles to accurately color manage input and output devices"; 103 homepage = https://www.freedesktop.org/software/colord/; 104 + license = licenses.lgpl2Plus; 105 + maintainers = [ maintainers.marcweber ]; 106 + platforms = platforms.linux; 107 }; 108 }
+72
pkgs/tools/misc/colord/installed-tests-path.patch
···
··· 1 + diff --git a/data/tests/meson.build b/data/tests/meson.build 2 + index 8b38f10..250582c 100644 3 + --- a/data/tests/meson.build 4 + +++ b/data/tests/meson.build 5 + @@ -17,6 +17,6 @@ if get_option('installed_tests') 6 + 'test.ccss', 7 + 'test.sp', 8 + ], 9 + - install_dir: join_paths(libexecdir, 'installed-tests', 'colord') 10 + + install_dir: join_paths('@installed_tests_dir@', 'libexec', 'installed-tests', 'colord') 11 + ) 12 + endif 13 + diff --git a/lib/colord/cd-test-shared.c b/lib/colord/cd-test-shared.c 14 + index c3b9d23..7577e13 100644 15 + --- a/lib/colord/cd-test-shared.c 16 + +++ b/lib/colord/cd-test-shared.c 17 + @@ -45,7 +45,8 @@ cd_test_get_filename (const gchar *filename) 18 + 19 + /* running in the installed system */ 20 + if (g_getenv ("INSTALLED_TESTS") != NULL) { 21 + - return g_build_filename (LIBEXECDIR, 22 + + return g_build_filename ("@installed_tests_dir@", 23 + + "libexec", 24 + "installed-tests", 25 + PACKAGE_NAME, 26 + filename, 27 + diff --git a/lib/colord/meson.build b/lib/colord/meson.build 28 + index 61f0518..df71358 100644 29 + --- a/lib/colord/meson.build 30 + +++ b/lib/colord/meson.build 31 + @@ -214,20 +214,20 @@ endif 32 + if get_option('installed_tests') 33 + con2 = configuration_data() 34 + con2.set('installedtestsdir', 35 + - join_paths(libexecdir, 'installed-tests', 'colord')) 36 + + join_paths('@installed_tests_dir@', 'libexec', 'installed-tests', 'colord')) 37 + configure_file( 38 + input : 'colord-daemon.test.in', 39 + output : 'colord-daemon.test', 40 + configuration : con2, 41 + install: true, 42 + - install_dir: join_paths('share', 'installed-tests', 'colord'), 43 + + install_dir: join_paths('@installed_tests_dir@', 'share', 'installed-tests', 'colord'), 44 + ) 45 + configure_file( 46 + input : 'colord-private.test.in', 47 + output : 'colord-private.test', 48 + configuration : con2, 49 + install: true, 50 + - install_dir: join_paths('share', 'installed-tests', 'colord'), 51 + + install_dir: join_paths('@installed_tests_dir@', 'share', 'installed-tests', 'colord'), 52 + ) 53 + endif 54 + 55 + @@ -254,7 +254,7 @@ if get_option('tests') 56 + '-DTESTDATADIR="' + testdatadir + '"', 57 + ], 58 + install : get_option('installed_tests'), 59 + - install_dir : join_paths(libexecdir, 'installed-tests', 'colord'), 60 + + install_dir : join_paths('@installed_tests_dir@','libexec', 'installed-tests', 'colord'), 61 + ) 62 + test('colord-test-private', e) 63 + e = executable( 64 + @@ -278,7 +278,7 @@ if get_option('tests') 65 + '-DTESTDATADIR="' + testdatadir + '"', 66 + ], 67 + install : get_option('installed_tests'), 68 + - install_dir : join_paths(libexecdir, 'installed-tests', 'colord'), 69 + + install_dir : join_paths('@installed_tests_dir@', 'libexec', 'installed-tests', 'colord'), 70 + ) 71 + test('colord-test-daemon', e) 72 + endif