Merge pull request #32751 from jtojnar/fwupd-1.0.2
fwupd: 1.0.1 → 1.0.4
This commit is contained in:
commit
c6283e6e06
@ -87,4 +87,8 @@ in {
|
||||
"d /var/lib/fwupd 0755 root root -"
|
||||
];
|
||||
};
|
||||
|
||||
meta = {
|
||||
maintainers = pkgs.fwupd.maintainers;
|
||||
};
|
||||
}
|
||||
|
@ -258,6 +258,7 @@ in rec {
|
||||
tests.firefox = callTest tests/firefox.nix {};
|
||||
tests.firewall = callTest tests/firewall.nix {};
|
||||
tests.fleet = callTestOnTheseSystems ["x86_64-linux"] tests/fleet.nix {};
|
||||
tests.fwupd = callTest tests/fwupd.nix {};
|
||||
#tests.gitlab = callTest tests/gitlab.nix {};
|
||||
tests.gitolite = callTest tests/gitolite.nix {};
|
||||
tests.gjs = callTest tests/gjs.nix {};
|
||||
|
19
nixos/tests/fwupd.nix
Normal file
19
nixos/tests/fwupd.nix
Normal file
@ -0,0 +1,19 @@
|
||||
# run installed tests
|
||||
import ./make-test.nix ({ pkgs, ... }: {
|
||||
name = "fwupd";
|
||||
|
||||
meta = {
|
||||
maintainers = pkgs.fwupd.meta.maintainers;
|
||||
};
|
||||
|
||||
machine = { config, pkgs, ... }: {
|
||||
services.fwupd.enable = true;
|
||||
environment.systemPackages = with pkgs; [ gnome-desktop-testing ];
|
||||
environment.variables.XDG_DATA_DIRS = [ "${pkgs.fwupd.installedTests}/share" ];
|
||||
virtualisation.memorySize = 768;
|
||||
};
|
||||
|
||||
testScript = ''
|
||||
$machine->succeed("gnome-desktop-testing-runner");
|
||||
'';
|
||||
})
|
@ -1,30 +1,49 @@
|
||||
{ stdenv, fetchFromGitHub, pkgconfig, gettext, gtk3, glib
|
||||
, gtk_doc, libarchive, gobjectIntrospection
|
||||
, sqlite, libsoup, gcab, attr, acl, docbook_xsl
|
||||
{ stdenv, fetchFromGitHub, substituteAll, pkgconfig, gettext, gtk3, glib
|
||||
, gtk_doc, libarchive, gobjectIntrospection, libxslt, pngquant
|
||||
, sqlite, libsoup, gcab, attr, acl, docbook_xsl, docbook_xml_dtd_42
|
||||
, libuuid, json_glib, meson, gperf, ninja
|
||||
}:
|
||||
stdenv.mkDerivation rec {
|
||||
name = "appstream-glib-0.7.2";
|
||||
name = "appstream-glib-0.7.6";
|
||||
|
||||
outputs = [ "out" "dev" "man" ];
|
||||
outputBin = "dev";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "hughsie";
|
||||
repo = "appstream-glib";
|
||||
rev = stdenv.lib.replaceStrings ["." "-"] ["_" "_"] name;
|
||||
sha256 = "1jvwfida12d2snc8p9lpbpqzrixw2naaiwfmsrldwkrxsj3i19pl";
|
||||
sha256 = "1nzm6w9n7fb2m06w88gwszaqf74bnip87ay0ca59wajq6y4mpfgv";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ meson pkgconfig ninja ];
|
||||
buildInputs = [ glib gtk_doc gettext sqlite libsoup
|
||||
gcab attr acl docbook_xsl libuuid json_glib
|
||||
libarchive gobjectIntrospection gperf ];
|
||||
nativeBuildInputs = [
|
||||
meson pkgconfig ninja gtk_doc libxslt docbook_xsl docbook_xml_dtd_42
|
||||
];
|
||||
buildInputs = [
|
||||
glib gettext sqlite libsoup
|
||||
gcab attr acl libuuid json_glib
|
||||
libarchive gobjectIntrospection gperf
|
||||
];
|
||||
propagatedBuildInputs = [ gtk3 ];
|
||||
mesonFlags = [ "-Denable-rpm=false" "-Denable-stemmer=false" "-Denable-dep11=false" ];
|
||||
|
||||
patches = [
|
||||
(substituteAll {
|
||||
src = ./paths.patch;
|
||||
pngquant= "${pngquant}/bin/pngquant";
|
||||
})
|
||||
];
|
||||
|
||||
mesonFlags = [
|
||||
"-Drpm=false"
|
||||
"-Dstemmer=false"
|
||||
"-Ddep11=false"
|
||||
];
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Objects and helper methods to read and write AppStream metadata";
|
||||
homepage = https://github.com/hughsie/appstream-glib;
|
||||
license = licenses.lgpl21Plus;
|
||||
platforms = platforms.linux;
|
||||
homepage = https://people.freedesktop.org/~hughsient/appstream-glib/;
|
||||
license = licenses.lgpl2Plus;
|
||||
platforms = platforms.linux;
|
||||
maintainers = with maintainers; [ lethalman matthewbauer ];
|
||||
};
|
||||
}
|
||||
|
11
pkgs/development/libraries/appstream-glib/paths.patch
Normal file
11
pkgs/development/libraries/appstream-glib/paths.patch
Normal file
@ -0,0 +1,11 @@
|
||||
--- a/libappstream-builder/asb-utils.c
|
||||
+++ b/libappstream-builder/asb-utils.c
|
||||
@@ -294,7 +294,7 @@
|
||||
{
|
||||
g_autofree gchar *standard_error = NULL;
|
||||
gint exit_status = 0;
|
||||
- const gchar *argv[] = { "/usr/bin/pngquant", "--skip-if-larger",
|
||||
+ const gchar *argv[] = { "@pngquant@", "--skip-if-larger",
|
||||
"--strip", "--ext", ".png",
|
||||
"--force", "--speed", "1", filename, NULL };
|
||||
if (!g_file_test (argv[0], G_FILE_TEST_IS_EXECUTABLE))
|
@ -1,16 +1,24 @@
|
||||
{ stdenv, fetchurl, intltool, gobjectIntrospection, pkgconfig }:
|
||||
{ stdenv, fetchurl, gettext, gobjectIntrospection, pkgconfig, meson, ninja, glibcLocales, git, vala, glib, zlib }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "gcab-${version}";
|
||||
version = "0.7";
|
||||
version = "1.1";
|
||||
|
||||
LC_ALL = "en_US.UTF-8";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://gnome/sources/gcab/${version}/${name}.tar.xz";
|
||||
sha256 = "1vxdsiky3492zlyrym02sdwf09y19rl2z5h5iin7qm0wizw5wvm1";
|
||||
sha256 = "0l19sr6pg0cfcddmi5n79d08mjjbhn427ip5jlsy9zddq9r24aqr";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ pkgconfig ];
|
||||
buildInputs = [ intltool gobjectIntrospection ];
|
||||
nativeBuildInputs = [ meson ninja glibcLocales git pkgconfig vala gettext gobjectIntrospection ];
|
||||
|
||||
buildInputs = [ glib zlib ];
|
||||
|
||||
mesonFlags = [
|
||||
"-Ddocs=false"
|
||||
"-Dtests=false"
|
||||
];
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
platforms = platforms.linux;
|
||||
|
@ -1,56 +1,87 @@
|
||||
{ stdenv, fetchurl, gtk_doc, pkgconfig, gobjectIntrospection, intltool
|
||||
{ stdenv, fetchurl, fetchpatch, gtk_doc, pkgconfig, gobjectIntrospection, intltool
|
||||
, libgudev, polkit, appstream-glib, gusb, sqlite, libarchive, glib_networking
|
||||
, libsoup, docbook2x, gpgme, libxslt, libelf, libsmbios, efivar, glibcLocales
|
||||
, fwupdate, libyaml, valgrind, meson, libuuid, pygobject3, colord
|
||||
, pillow, ninja, gcab, gnutls, python3Packages, wrapGAppsHook
|
||||
, libsoup, help2man, gpgme, libxslt, elfutils, libsmbios, efivar, glibcLocales
|
||||
, fwupdate, libyaml, valgrind, meson, libuuid, colord, docbook_xml_dtd_43, docbook_xsl
|
||||
, ninja, gcab, gnutls, python3, wrapGAppsHook, json_glib
|
||||
, shared_mime_info, umockdev
|
||||
}:
|
||||
let
|
||||
version = "1.0.1";
|
||||
version = "1.0.4";
|
||||
python = python3.withPackages (p: with p; [ pygobject3 pycairo pillow ]);
|
||||
installedTestsPython = python3.withPackages (p: with p; [ pygobject3 requests ]);
|
||||
in stdenv.mkDerivation {
|
||||
name = "fwupd-${version}";
|
||||
src = fetchurl {
|
||||
url = "https://people.freedesktop.org/~hughsient/releases/fwupd-${version}.tar.xz";
|
||||
sha256 = "1k627rja7df51dkzqvkzgbwrrj4049k6408d01m34n66zwr2fp59";
|
||||
sha256 = "1n4d6fw3ffg051072hbxn106s52x2wlh5dh2kxwdfjsb5kh03ra3";
|
||||
};
|
||||
|
||||
outputs = [ "out" "devdoc" "man" "installedTests" ];
|
||||
|
||||
nativeBuildInputs = [
|
||||
meson ninja gtk_doc pkgconfig gobjectIntrospection intltool glibcLocales
|
||||
valgrind gcab docbook2x libxslt pygobject3 python3Packages.pycairo wrapGAppsHook
|
||||
meson ninja gtk_doc pkgconfig gobjectIntrospection intltool glibcLocales shared_mime_info
|
||||
valgrind gcab docbook_xml_dtd_43 docbook_xsl help2man libxslt python wrapGAppsHook
|
||||
];
|
||||
buildInputs = [
|
||||
polkit appstream-glib gusb sqlite libarchive libsoup libelf libsmbios fwupdate libyaml
|
||||
libgudev colord gpgme libuuid pillow gnutls glib_networking
|
||||
polkit appstream-glib gusb sqlite libarchive libsoup elfutils libsmbios fwupdate libyaml
|
||||
libgudev colord gpgme libuuid gnutls glib_networking efivar json_glib umockdev
|
||||
];
|
||||
|
||||
LC_ALL = "en_US.UTF-8"; # For po/make-images
|
||||
|
||||
NIX_CFLAGS_COMPILE = [
|
||||
"-I${efivar}/include/efivar"
|
||||
# warning: "__LIBELF_INTERNAL__" is not defined
|
||||
"-Wno-error=undef"
|
||||
];
|
||||
|
||||
patches = [
|
||||
./fix-missing-deps.patch
|
||||
# https://github.com/hughsie/fwupd/issues/403
|
||||
(fetchpatch {
|
||||
url = https://github.com/hughsie/fwupd/commit/bd6082574989e4f48b66c7270bb408d439b77a06.patch;
|
||||
sha256 = "17pixyizkmn6wlsjmr1wwya17ivn770hdv9mp769vifxinya8w9y";
|
||||
})
|
||||
# drop docbook2man
|
||||
(fetchpatch {
|
||||
url = https://github.com/hughsie/fwupd/commit/2c43d3e6e65868b66a9a64a76123697e259ec7c2.patch;
|
||||
sha256 = "0vjv7jnai0g96frlipk2sc59pj3mhq9di01hajycjv7y5v6qqrmc";
|
||||
})
|
||||
# https://github.com/hughsie/fwupd/issues/405
|
||||
(fetchpatch {
|
||||
url = https://github.com/hughsie/fwupd/pull/407.patch;
|
||||
sha256 = "1dxhqps12x7bz0s974xk5hfpk4nwn1gs29vl0dfi9j54wy18f688";
|
||||
})
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
# needs a different set of modules than po/make-images
|
||||
escapedInterpreterLine=$(echo "${installedTestsPython}/bin/python3" | sed 's|\\|\\\\|g')
|
||||
sed -i -e "1 s|.*|#\!$escapedInterpreterLine|" data/installed-tests/hardware.py
|
||||
|
||||
patchShebangs .
|
||||
substituteInPlace data/installed-tests/fwupdmgr.test.in --subst-var-by installedtestsdir "$installedTests/share/installed-tests/fwupd"
|
||||
'';
|
||||
|
||||
doCheck = true;
|
||||
|
||||
preFixup = ''
|
||||
gappsWrapperArgs+=(--prefix XDG_DATA_DIRS : "${shared_mime_info}/share")
|
||||
'';
|
||||
|
||||
mesonFlags = [
|
||||
"-Denable-man=false"
|
||||
"-Denable-tests=false"
|
||||
"-Denable-doc=false"
|
||||
"-Dwith-bootdir=/boot"
|
||||
"-Dwith-udevdir=lib/udev"
|
||||
"-Dwith-systemdunitdir=lib/systemd/system"
|
||||
"-Dplugin_dummy=true"
|
||||
"-Dbootdir=/boot"
|
||||
"-Dudevdir=lib/udev"
|
||||
"-Dsystemdunitdir=lib/systemd/system"
|
||||
"--localstatedir=/var"
|
||||
];
|
||||
|
||||
postInstall = ''
|
||||
moveToOutput share/installed-tests "$installedTests"
|
||||
wrapProgram $installedTests/share/installed-tests/fwupd/hardware.py \
|
||||
--prefix GI_TYPELIB_PATH : "$out/lib/girepository-1.0:${libsoup}/lib/girepository-1.0"
|
||||
'';
|
||||
|
||||
enableParallelBuilding = true;
|
||||
meta = {
|
||||
meta = with stdenv.lib; {
|
||||
homepage = https://fwupd.org/;
|
||||
license = [ stdenv.lib.licenses.gpl2 ];
|
||||
platforms = stdenv.lib.platforms.linux;
|
||||
maintainers = with maintainers; [];
|
||||
license = [ licenses.gpl2 ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
|
@ -2,7 +2,7 @@
|
||||
+++ b/data/builder/meson.build
|
||||
@@ -1,3 +0,0 @@
|
||||
-install_data('README.md',
|
||||
- install_dir : join_paths(get_option('localstatedir'), 'lib', 'fwupd', 'builder')
|
||||
- install_dir : join_paths(localstatedir, 'lib', 'fwupd', 'builder')
|
||||
-)
|
||||
--- a/data/meson.build
|
||||
+++ b/data/meson.build
|
||||
@ -11,15 +11,15 @@
|
||||
endif
|
||||
|
||||
-install_data(['daemon.conf'],
|
||||
- install_dir : join_paths(get_option('sysconfdir'), 'fwupd')
|
||||
- install_dir : join_paths(sysconfdir, 'fwupd')
|
||||
-)
|
||||
-
|
||||
install_data(['org.freedesktop.fwupd.metainfo.xml'],
|
||||
install_dir: join_paths(get_option('datadir'), 'metainfo')
|
||||
install_dir: join_paths(datadir, 'metainfo')
|
||||
)
|
||||
|
||||
install_data(['org.freedesktop.fwupd.conf'],
|
||||
- install_dir : join_paths(get_option('sysconfdir'), 'dbus-1', 'system.d')
|
||||
- install_dir : join_paths(sysconfdir, 'dbus-1', 'system.d')
|
||||
+ install_dir : join_paths(get_option('prefix'), 'etc', 'dbus-1', 'system.d')
|
||||
)
|
||||
|
||||
@ -30,14 +30,14 @@
|
||||
'GPG-KEY-Hughski-Limited',
|
||||
'GPG-KEY-Linux-Vendor-Firmware-Service',
|
||||
],
|
||||
- install_dir : join_paths(get_option('sysconfdir'), 'pki', 'fwupd')
|
||||
- install_dir : join_paths(sysconfdir, 'pki', 'fwupd')
|
||||
+ install_dir : join_paths(get_option('prefix'), 'etc', 'pki', 'fwupd')
|
||||
)
|
||||
|
||||
install_data([
|
||||
'GPG-KEY-Linux-Vendor-Firmware-Service',
|
||||
],
|
||||
- install_dir : join_paths(get_option('sysconfdir'), 'pki', 'fwupd-metadata')
|
||||
- install_dir : join_paths(sysconfdir, 'pki', 'fwupd-metadata')
|
||||
+ install_dir : join_paths(get_option('prefix'), 'etc', 'pki', 'fwupd-metadata')
|
||||
)
|
||||
endif
|
||||
@ -46,13 +46,13 @@
|
||||
install_data([
|
||||
'LVFS-CA.pem',
|
||||
],
|
||||
- install_dir : join_paths(get_option('sysconfdir'), 'pki', 'fwupd')
|
||||
- install_dir : join_paths(sysconfdir, 'pki', 'fwupd')
|
||||
+ install_dir : join_paths(get_option('prefix'), 'etc', 'pki', 'fwupd')
|
||||
)
|
||||
install_data([
|
||||
'LVFS-CA.pem',
|
||||
],
|
||||
- install_dir : join_paths(get_option('sysconfdir'), 'pki', 'fwupd-metadata')
|
||||
- install_dir : join_paths(sysconfdir, 'pki', 'fwupd-metadata')
|
||||
+ install_dir : join_paths(get_option('prefix'), 'etc', 'pki', 'fwupd-metadata')
|
||||
)
|
||||
endif
|
||||
@ -63,7 +63,7 @@
|
||||
'lvfs.conf',
|
||||
'lvfs-testing.conf',
|
||||
],
|
||||
- install_dir : join_paths(get_option('sysconfdir'), 'fwupd', 'remotes.d')
|
||||
- install_dir : join_paths(sysconfdir, 'fwupd', 'remotes.d')
|
||||
+ install_dir : join_paths(get_option('prefix'), 'etc', 'fwupd', 'remotes.d')
|
||||
)
|
||||
endif
|
||||
@ -72,7 +72,7 @@
|
||||
output : 'fwupd.conf',
|
||||
configuration : con2,
|
||||
install: true,
|
||||
- install_dir: join_paths(get_option('sysconfdir'), 'fwupd', 'remotes.d'),
|
||||
- install_dir: join_paths(sysconfdir, 'fwupd', 'remotes.d'),
|
||||
+ install_dir: join_paths(get_option('prefix'), 'etc', 'fwupd', 'remotes.d'),
|
||||
)
|
||||
configure_file(
|
||||
@ -80,7 +80,7 @@
|
||||
output : 'vendor.conf',
|
||||
configuration : con2,
|
||||
install: true,
|
||||
- install_dir: join_paths(get_option('sysconfdir'), 'fwupd', 'remotes.d'),
|
||||
- install_dir: join_paths(sysconfdir, 'fwupd', 'remotes.d'),
|
||||
+ install_dir: join_paths(get_option('prefix'), 'etc', 'fwupd', 'remotes.d'),
|
||||
)
|
||||
--- a/meson_post_install.sh
|
||||
|
@ -2,27 +2,21 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "efivar-${version}";
|
||||
version = "30";
|
||||
version = "34";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "rhinstaller";
|
||||
repo = "efivar";
|
||||
rev = version;
|
||||
sha256 = "1pghj019qr7qpqd9rxfhsr1hm3s0w1hd5cdndpl07vhys8hy4a8a";
|
||||
sha256 = "0ycrdaz0ijkm3xb9fnwzhwi0pdj5c6s636wj4i6lbjbrijbzn4x5";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ pkgconfig ];
|
||||
buildInputs = [ popt ];
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace src/Makefile --replace "-static" ""
|
||||
'';
|
||||
|
||||
installFlags = [
|
||||
makeFlags = [
|
||||
"prefix=$(out)"
|
||||
"libdir=$(out)/lib"
|
||||
"mandir=$(out)/share/man"
|
||||
"includedir=$(out)/include"
|
||||
"bindir=$(out)/bin"
|
||||
];
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
|
@ -12728,7 +12728,7 @@ with pkgs;
|
||||
fscrypt-experimental = callPackage ../os-specific/linux/fscrypt { };
|
||||
fscryptctl-experimental = callPackage ../os-specific/linux/fscryptctl { };
|
||||
|
||||
fwupd = callPackage ../os-specific/linux/firmware/fwupd { inherit (gnome2) gtk_doc; inherit (python3Packages) pygobject3 pillow; };
|
||||
fwupd = callPackage ../os-specific/linux/firmware/fwupd { };
|
||||
|
||||
fwupdate = callPackage ../os-specific/linux/firmware/fwupdate { };
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user