fwupd: enable tests
This commit is contained in:
parent
640916d55d
commit
be54e4b07e
@ -1,9 +1,9 @@
|
|||||||
{ stdenv, fetchurl, gtk_doc, pkgconfig, gobjectIntrospection, intltool
|
{ stdenv, fetchurl, fetchpatch, gtk_doc, pkgconfig, gobjectIntrospection, intltool
|
||||||
, libgudev, polkit, appstream-glib, gusb, sqlite, libarchive, glib_networking
|
, libgudev, polkit, appstream-glib, gusb, sqlite, libarchive, glib_networking
|
||||||
, libsoup, docbook2x, gpgme, libxslt, elfutils, libsmbios, efivar, glibcLocales
|
, libsoup, docbook2x, gpgme, libxslt, elfutils, libsmbios, efivar, glibcLocales
|
||||||
, fwupdate, libyaml, valgrind, meson, libuuid, pygobject3, colord
|
, fwupdate, libyaml, valgrind, meson, libuuid, pygobject3, colord
|
||||||
, pillow, ninja, gcab, gnutls, python3Packages, wrapGAppsHook, json_glib
|
, pillow, ninja, gcab, gnutls, python3Packages, wrapGAppsHook, json_glib
|
||||||
, shared_mime_info
|
, shared_mime_info, umockdev
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
version = "1.0.4";
|
version = "1.0.4";
|
||||||
@ -14,31 +14,40 @@ in stdenv.mkDerivation {
|
|||||||
sha256 = "1n4d6fw3ffg051072hbxn106s52x2wlh5dh2kxwdfjsb5kh03ra3";
|
sha256 = "1n4d6fw3ffg051072hbxn106s52x2wlh5dh2kxwdfjsb5kh03ra3";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
outputs = [ "out" "installedTests" ];
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
meson ninja gtk_doc pkgconfig gobjectIntrospection intltool glibcLocales
|
meson ninja gtk_doc pkgconfig gobjectIntrospection intltool glibcLocales shared_mime_info
|
||||||
valgrind gcab docbook2x libxslt pygobject3 python3Packages.pycairo wrapGAppsHook
|
valgrind gcab docbook2x libxslt pygobject3 python3Packages.pycairo wrapGAppsHook
|
||||||
];
|
];
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
polkit appstream-glib gusb sqlite libarchive libsoup elfutils libsmbios fwupdate libyaml
|
polkit appstream-glib gusb sqlite libarchive libsoup elfutils libsmbios fwupdate libyaml
|
||||||
libgudev colord gpgme libuuid pillow gnutls glib_networking efivar json_glib
|
libgudev colord gpgme libuuid pillow gnutls glib_networking efivar json_glib umockdev
|
||||||
];
|
];
|
||||||
|
|
||||||
LC_ALL = "en_US.UTF-8"; # For po/make-images
|
LC_ALL = "en_US.UTF-8"; # For po/make-images
|
||||||
|
|
||||||
patches = [
|
patches = [
|
||||||
./fix-missing-deps.patch
|
./fix-missing-deps.patch
|
||||||
|
# https://github.com/hughsie/fwupd/issues/403
|
||||||
|
(fetchpatch {
|
||||||
|
url = https://github.com/hughsie/fwupd/commit/bd6082574989e4f48b66c7270bb408d439b77a06.patch;
|
||||||
|
sha256 = "17pixyizkmn6wlsjmr1wwya17ivn770hdv9mp769vifxinya8w9y";
|
||||||
|
})
|
||||||
];
|
];
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
patchShebangs .
|
patchShebangs .
|
||||||
|
substituteInPlace data/installed-tests/fwupdmgr.test.in --subst-var-by installedtestsdir "$installedTests/share/installed-tests/fwupd"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
doCheck = true;
|
||||||
|
|
||||||
preFixup = ''
|
preFixup = ''
|
||||||
gappsWrapperArgs+=(--prefix XDG_DATA_DIRS : "${shared_mime_info}/share")
|
gappsWrapperArgs+=(--prefix XDG_DATA_DIRS : "${shared_mime_info}/share")
|
||||||
'';
|
'';
|
||||||
|
|
||||||
mesonFlags = [
|
mesonFlags = [
|
||||||
"-Dman=false"
|
"-Dman=false"
|
||||||
"-Dtests=false"
|
|
||||||
"-Dgtkdoc=false"
|
"-Dgtkdoc=false"
|
||||||
"-Dbootdir=/boot"
|
"-Dbootdir=/boot"
|
||||||
"-Dudevdir=lib/udev"
|
"-Dudevdir=lib/udev"
|
||||||
@ -46,10 +55,15 @@ in stdenv.mkDerivation {
|
|||||||
"--localstatedir=/var"
|
"--localstatedir=/var"
|
||||||
];
|
];
|
||||||
|
|
||||||
|
postInstall = ''
|
||||||
|
moveToOutput share/installed-tests "$installedTests"
|
||||||
|
'';
|
||||||
|
|
||||||
enableParallelBuilding = true;
|
enableParallelBuilding = true;
|
||||||
meta = {
|
meta = with stdenv.lib; {
|
||||||
homepage = https://fwupd.org/;
|
homepage = https://fwupd.org/;
|
||||||
license = [ stdenv.lib.licenses.gpl2 ];
|
maintainers = with maintainers; [];
|
||||||
platforms = stdenv.lib.platforms.linux;
|
license = [ licenses.gpl2 ];
|
||||||
|
platforms = platforms.linux;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user