diff options
author | Alyssa Ross <hi@alyssa.is> | 2020-01-11 23:37:02 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2020-01-11 23:41:30 +0000 |
commit | 6c557e3f1c28cf87e9fba232811d6875dd1399c1 (patch) | |
tree | 035a071d5d8980df6de0fa42e2ef8fc0cce7055e /nixpkgs/pkgs/development/libraries/bamf | |
parent | da7500bc026e937ac7fce7b50f67a0e1765737a7 (diff) | |
parent | e4134747f5666bcab8680aff67fa3b63384f9a0f (diff) | |
download | nixlib-6c557e3f1c28cf87e9fba232811d6875dd1399c1.tar nixlib-6c557e3f1c28cf87e9fba232811d6875dd1399c1.tar.gz nixlib-6c557e3f1c28cf87e9fba232811d6875dd1399c1.tar.bz2 nixlib-6c557e3f1c28cf87e9fba232811d6875dd1399c1.tar.lz nixlib-6c557e3f1c28cf87e9fba232811d6875dd1399c1.tar.xz nixlib-6c557e3f1c28cf87e9fba232811d6875dd1399c1.tar.zst nixlib-6c557e3f1c28cf87e9fba232811d6875dd1399c1.zip |
Merge commit 'e4134747f5666bcab8680aff67fa3b63384f9a0f'
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/bamf')
-rw-r--r-- | nixpkgs/pkgs/development/libraries/bamf/default.nix | 49 | ||||
-rw-r--r-- | nixpkgs/pkgs/development/libraries/bamf/gtester2xunit-python3.patch | 53 |
2 files changed, 88 insertions, 14 deletions
diff --git a/nixpkgs/pkgs/development/libraries/bamf/default.nix b/nixpkgs/pkgs/development/libraries/bamf/default.nix index b1fb17b08fa9..60322f530166 100644 --- a/nixpkgs/pkgs/development/libraries/bamf/default.nix +++ b/nixpkgs/pkgs/development/libraries/bamf/default.nix @@ -1,6 +1,25 @@ -{ stdenv, autoconf, automake, libtool, gnome3, which, fetchgit, libgtop, libwnck3, glib, vala, pkgconfig -, libstartup_notification, gobject-introspection, gtk-doc, docbook_xsl -, xorgserver, dbus, python2, wrapGAppsHook }: +{ stdenv +, pantheon +, autoconf +, automake +, libtool +, gnome3 +, which +, fetchgit +, libgtop +, libwnck3 +, glib +, vala +, pkgconfig +, libstartup_notification +, gobject-introspection +, gtk-doc +, docbook_xsl +, xorgserver +, dbus +, python3 +, wrapGAppsHook +}: stdenv.mkDerivation rec { pname = "bamf"; @@ -9,14 +28,16 @@ stdenv.mkDerivation rec { outputs = [ "out" "dev" "devdoc" ]; src = fetchgit { - url = https://git.launchpad.net/~unity-team/bamf; + url = "https://git.launchpad.net/~unity-team/bamf"; rev = version; sha256 = "1klvij1wyhdj5d8sr3b16pfixc1yk8ihglpjykg7zrr1f50jfgsz"; }; nativeBuildInputs = [ + (python3.withPackages (ps: with ps; [ lxml ])) # Tests autoconf automake + dbus docbook_xsl gnome3.gnome-common gobject-introspection @@ -25,13 +46,8 @@ stdenv.mkDerivation rec { pkgconfig vala which - # Tests - python2 - python2.pkgs.libxslt - python2.pkgs.libxml2 - dbus - xorgserver wrapGAppsHook + xorgserver ]; buildInputs = [ @@ -41,6 +57,11 @@ stdenv.mkDerivation rec { libwnck3 ]; + patches = [ + # Port tests and checks to python3 lxml. + ./gtester2xunit-python3.patch + ]; + # Fix hard-coded path # https://bugs.launchpad.net/bamf/+bug/1780557 postPatch = '' @@ -49,8 +70,8 @@ stdenv.mkDerivation rec { ''; configureFlags = [ - "--enable-headless-tests" "--enable-gtk-doc" + "--enable-headless-tests" ]; # fix paths @@ -66,8 +87,8 @@ stdenv.mkDerivation rec { # TODO: Requires /etc/machine-id doCheck = false; - # ignore deprecation errors - NIX_CFLAGS_COMPILE = "-Wno-deprecated-declarations"; + # glib-2.62 deprecations + NIX_CFLAGS_COMPILE = "-DGLIB_DISABLE_DEPRECATION_WARNINGS"; meta = with stdenv.lib; { description = "Application matching framework"; @@ -78,6 +99,6 @@ stdenv.mkDerivation rec { homepage = https://launchpad.net/bamf; license = licenses.lgpl3; platforms = platforms.linux; - maintainers = with maintainers; [ davidak ]; + maintainers = with maintainers; [ davidak ] ++ pantheon.maintainers; }; } diff --git a/nixpkgs/pkgs/development/libraries/bamf/gtester2xunit-python3.patch b/nixpkgs/pkgs/development/libraries/bamf/gtester2xunit-python3.patch new file mode 100644 index 000000000000..8dc478541943 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/bamf/gtester2xunit-python3.patch @@ -0,0 +1,53 @@ +diff --git a/configure.ac b/configure.ac +index 41cb7db..93ef0ec 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -115,9 +115,9 @@ GTK_DOC_CHECK(1.0) + + AC_PATH_PROG([PYTHON],[python]) + AC_MSG_CHECKING(for gtester2xunit dependencies) +-if !($PYTHON -c "import libxslt, libxml2" 2> /dev/null); then ++if !($PYTHON -c "import lxml" 2> /dev/null); then + AC_MSG_RESULT([no]) +- AC_MSG_ERROR([You need to install python-libxslt1 and python-libxml2]); ++ AC_MSG_ERROR([You need to install python-lxml]); + fi + AC_MSG_RESULT([yes]) + +@@ -189,6 +189,6 @@ ${PACKAGE}-${VERSION} + Introspection: ${enable_introspection} + Headless tests: ${enable_headless_tests} + Coverage Reporting: ${use_gcov} +- Export actions menus: ${enable_export_actions_menu} ++ Export actions menus: ${enable_export_actions_menu} + + EOF +diff --git a/tests/gtester2xunit.py b/tests/gtester2xunit.py +index fbe3c66..861d541 100755 +--- a/tests/gtester2xunit.py ++++ b/tests/gtester2xunit.py +@@ -1,18 +1,17 @@ + #! /usr/bin/python + from argparse import ArgumentParser +-import libxslt +-import libxml2 + import sys + import os ++from lxml import etree + + XSL_TRANSFORM='/usr/share/gtester2xunit/gtester.xsl' + + def transform_file(input_filename, output_filename, xsl_file): +- gtester = libxml2.parseFile(xsl_file) +- style = libxslt.parseStylesheetDoc(gtester) +- doc = libxml2.parseFile(input_filename) +- result = style.applyStylesheet(doc, None) +- result.saveFormatFile(filename=output_filename, format=True) ++ gtester = etree.parse(xsl_file) ++ style = etree.XSLT(gtester) ++ doc = etree.parse(input_filename) ++ result = style(doc) ++ result.write(filename=output_filename, format=True) + + + def get_output_filename(input_filename): |