2018-02-14 02:06:38 +00:00
|
|
|
{ stdenv, fetchurl, fetchpatch, gtk_doc, pkgconfig, gobjectIntrospection, intltool
|
2017-09-18 14:14:21 +01:00
|
|
|
, libgudev, polkit, appstream-glib, gusb, sqlite, libarchive, glib_networking
|
2018-02-14 01:08:53 +00:00
|
|
|
, libsoup, docbook2x, gpgme, libxslt, elfutils, libsmbios, efivar, glibcLocales
|
2017-09-18 14:14:21 +01:00
|
|
|
, fwupdate, libyaml, valgrind, meson, libuuid, pygobject3, colord
|
2017-12-17 08:16:38 +00:00
|
|
|
, pillow, ninja, gcab, gnutls, python3Packages, wrapGAppsHook, json_glib
|
2018-02-14 02:06:38 +00:00
|
|
|
, shared_mime_info, umockdev
|
2017-02-27 13:38:49 +00:00
|
|
|
}:
|
2017-09-18 14:14:21 +01:00
|
|
|
let
|
2017-12-17 08:16:38 +00:00
|
|
|
version = "1.0.4";
|
2017-09-18 14:14:21 +01:00
|
|
|
in stdenv.mkDerivation {
|
|
|
|
name = "fwupd-${version}";
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://people.freedesktop.org/~hughsient/releases/fwupd-${version}.tar.xz";
|
2017-12-17 08:16:38 +00:00
|
|
|
sha256 = "1n4d6fw3ffg051072hbxn106s52x2wlh5dh2kxwdfjsb5kh03ra3";
|
2017-09-18 14:14:21 +01:00
|
|
|
};
|
|
|
|
|
2018-02-14 02:06:38 +00:00
|
|
|
outputs = [ "out" "installedTests" ];
|
|
|
|
|
2017-09-18 14:14:21 +01:00
|
|
|
nativeBuildInputs = [
|
2018-02-14 02:06:38 +00:00
|
|
|
meson ninja gtk_doc pkgconfig gobjectIntrospection intltool glibcLocales shared_mime_info
|
2017-09-18 14:14:21 +01:00
|
|
|
valgrind gcab docbook2x libxslt pygobject3 python3Packages.pycairo wrapGAppsHook
|
|
|
|
];
|
|
|
|
buildInputs = [
|
2018-02-14 01:08:53 +00:00
|
|
|
polkit appstream-glib gusb sqlite libarchive libsoup elfutils libsmbios fwupdate libyaml
|
2018-02-14 02:06:38 +00:00
|
|
|
libgudev colord gpgme libuuid pillow gnutls glib_networking efivar json_glib umockdev
|
2017-09-18 14:14:21 +01:00
|
|
|
];
|
|
|
|
|
|
|
|
LC_ALL = "en_US.UTF-8"; # For po/make-images
|
|
|
|
|
|
|
|
patches = [
|
|
|
|
./fix-missing-deps.patch
|
2018-02-14 02:06:38 +00:00
|
|
|
# https://github.com/hughsie/fwupd/issues/403
|
|
|
|
(fetchpatch {
|
|
|
|
url = https://github.com/hughsie/fwupd/commit/bd6082574989e4f48b66c7270bb408d439b77a06.patch;
|
|
|
|
sha256 = "17pixyizkmn6wlsjmr1wwya17ivn770hdv9mp769vifxinya8w9y";
|
|
|
|
})
|
2017-09-18 14:14:21 +01:00
|
|
|
];
|
|
|
|
postPatch = ''
|
|
|
|
patchShebangs .
|
2018-02-14 02:06:38 +00:00
|
|
|
substituteInPlace data/installed-tests/fwupdmgr.test.in --subst-var-by installedtestsdir "$installedTests/share/installed-tests/fwupd"
|
2017-09-18 14:14:21 +01:00
|
|
|
'';
|
|
|
|
|
2018-02-14 02:06:38 +00:00
|
|
|
doCheck = true;
|
|
|
|
|
2018-02-10 04:23:17 +00:00
|
|
|
preFixup = ''
|
|
|
|
gappsWrapperArgs+=(--prefix XDG_DATA_DIRS : "${shared_mime_info}/share")
|
|
|
|
'';
|
|
|
|
|
2017-09-18 14:14:21 +01:00
|
|
|
mesonFlags = [
|
2017-12-17 08:16:38 +00:00
|
|
|
"-Dman=false"
|
|
|
|
"-Dgtkdoc=false"
|
|
|
|
"-Dbootdir=/boot"
|
|
|
|
"-Dudevdir=lib/udev"
|
|
|
|
"-Dsystemdunitdir=lib/systemd/system"
|
2017-09-18 14:14:21 +01:00
|
|
|
"--localstatedir=/var"
|
|
|
|
];
|
|
|
|
|
2018-02-14 02:06:38 +00:00
|
|
|
postInstall = ''
|
|
|
|
moveToOutput share/installed-tests "$installedTests"
|
|
|
|
'';
|
|
|
|
|
2017-09-18 14:14:21 +01:00
|
|
|
enableParallelBuilding = true;
|
2018-02-14 02:06:38 +00:00
|
|
|
meta = with stdenv.lib; {
|
2017-09-18 14:14:21 +01:00
|
|
|
homepage = https://fwupd.org/;
|
2018-02-14 02:06:38 +00:00
|
|
|
maintainers = with maintainers; [];
|
|
|
|
license = [ licenses.gpl2 ];
|
|
|
|
platforms = platforms.linux;
|
2017-09-18 14:14:21 +01:00
|
|
|
};
|
|
|
|
}
|