diff options
author | Frederik Rietdijk <fridh@fridh.nl> | 2019-09-08 14:49:25 +0200 |
---|---|---|
committer | Frederik Rietdijk <fridh@fridh.nl> | 2019-09-08 14:49:25 +0200 |
commit | e73f8712851f6905f82c84daef1d2bb75b0c95c1 (patch) | |
tree | 0c60ad92ba4283fb413cddaceecf7f26e6b5345d /pkgs/os-specific | |
parent | 9fcdb3bd168213ad8cafbae9bfab44bc01b73933 (diff) | |
parent | 362c2f67f9e24771f6634cec90111ab7992b5cfa (diff) |
Merge master into staging-next
Diffstat (limited to 'pkgs/os-specific')
-rw-r--r-- | pkgs/os-specific/linux/firmware/fwupd/default.nix | 162 | ||||
-rw-r--r-- | pkgs/os-specific/linux/upower/default.nix | 41 |
2 files changed, 157 insertions, 46 deletions
diff --git a/pkgs/os-specific/linux/firmware/fwupd/default.nix b/pkgs/os-specific/linux/firmware/fwupd/default.nix index b4d5d54137cd..c688d8c6ab39 100644 --- a/pkgs/os-specific/linux/firmware/fwupd/default.nix +++ b/pkgs/os-specific/linux/firmware/fwupd/default.nix @@ -1,18 +1,68 @@ -{ stdenv, fetchurl, substituteAll, gtk-doc, pkgconfig, gobject-introspection, intltool -, libgudev, polkit, libxmlb, gusb, sqlite, libarchive, glib-networking -, libsoup, help2man, gpgme, libxslt, elfutils, libsmbios, efivar, gnu-efi -, libyaml, valgrind, meson, libuuid, colord, docbook_xml_dtd_43, docbook_xsl -, ninja, gcab, gnutls, python3, wrapGAppsHook, json-glib, bash-completion -, shared-mime-info, umockdev, vala, makeFontsConf, freefont_ttf -, cairo, freetype, fontconfig, pango -, bubblewrap, efibootmgr, flashrom, tpm2-tools -}: - # Updating? Keep $out/etc synchronized with passthru.filesInstalledToEtc +{ stdenv +, fetchurl +, substituteAll +, gtk-doc +, pkgconfig +, gobject-introspection +, intltool +, libgudev +, polkit +, libxmlb +, gusb +, sqlite +, libarchive +, glib-networking +, libsoup +, help2man +, gpgme +, libxslt +, elfutils +, libsmbios +, efivar +, gnu-efi +, libyaml +, valgrind +, meson +, libuuid +, colord +, docbook_xml_dtd_43 +, docbook_xsl +, ninja +, gcab +, gnutls +, python3 +, wrapGAppsHook +, json-glib +, bash-completion +, shared-mime-info +, umockdev +, vala +, makeFontsConf +, freefont_ttf +, cairo +, freetype +, fontconfig +, pango +, bubblewrap +, efibootmgr +, flashrom +, tpm2-tools +, nixosTests +}: + let - python = python3.withPackages (p: with p; [ pygobject3 pycairo pillow ]); - installedTestsPython = python3.withPackages (p: with p; [ pygobject3 requests ]); + python = python3.withPackages (p: with p; [ + pygobject3 + pycairo + pillow + ]); + + installedTestsPython = python3.withPackages (p: with p; [ + pygobject3 + requests + ]); fontsConf = makeFontsConf { fontDirectories = [ freefont_ttf ]; @@ -26,30 +76,70 @@ let # only redfish for x86_64 haveRedfish = stdenv.isx86_64; - # Currently broken on Aarch64 - haveFlashrom = isx86; + # # Currently broken on Aarch64 + # haveFlashrom = isx86; + # Experimental in 1.2.10 + haveFlashrom = false; -in stdenv.mkDerivation rec { +in + +stdenv.mkDerivation rec { pname = "fwupd"; - version = "1.2.8"; + version = "1.2.10"; src = fetchurl { url = "https://people.freedesktop.org/~hughsient/releases/fwupd-${version}.tar.xz"; - sha256 = "0qbvq52c0scn1h99i1rf2la6rrhckin6gb02k7l0v3g07mxs20wc"; + sha256 = "0inngs7i48akm9c7fmdsf9zjif595rkaba69rl76jfwfv8r21vjb"; }; outputs = [ "out" "lib" "dev" "devdoc" "man" "installedTests" ]; nativeBuildInputs = [ - meson ninja gtk-doc pkgconfig gobject-introspection intltool shared-mime-info - valgrind gcab docbook_xml_dtd_43 docbook_xsl help2man libxslt python wrapGAppsHook vala + meson + ninja + gtk-doc + pkgconfig + gobject-introspection + intltool + shared-mime-info + valgrind + gcab + docbook_xml_dtd_43 + docbook_xsl + help2man + libxslt + python + wrapGAppsHook + vala ]; buildInputs = [ - polkit libxmlb gusb sqlite libarchive libsoup elfutils gnu-efi libyaml - libgudev colord gpgme libuuid gnutls glib-networking json-glib umockdev - bash-completion cairo freetype fontconfig pango efivar - ] ++ stdenv.lib.optionals haveDell [ libsmbios ]; + polkit + libxmlb + gusb + sqlite + libarchive + libsoup + elfutils + gnu-efi + libyaml + libgudev + colord + gpgme + libuuid + gnutls + glib-networking + json-glib + umockdev + bash-completion + cairo + freetype + fontconfig + pango + efivar + ] ++ stdenv.lib.optionals haveDell [ + libsmbios + ]; patches = [ ./fix-paths.patch @@ -65,7 +155,12 @@ in stdenv.mkDerivation rec { ]; postPatch = '' - patchShebangs . + patchShebangs \ + libfwupd/generate-version-script.py \ + meson_post_install.sh \ + po/make-images \ + po/make-images.sh \ + po/test-deps # we cannot use placeholder in substituteAll # https://github.com/NixOS/nix/issues/1846 @@ -85,9 +180,12 @@ in stdenv.mkDerivation rec { # doCheck = true; preFixup = let - binPath = [ efibootmgr bubblewrap tpm2-tools ] ++ stdenv.lib.optional haveFlashrom flashrom; - in - '' + binPath = [ + efibootmgr + bubblewrap + tpm2-tools + ] ++ stdenv.lib.optional haveFlashrom flashrom; + in '' gappsWrapperArgs+=( --prefix XDG_DATA_DIRS : "${shared-mime-info}/share" # See programs reached with fu_common_find_program_in_path in source @@ -128,6 +226,10 @@ in stdenv.mkDerivation rec { FONTCONFIG_FILE = fontsConf; # Fontconfig error: Cannot load default config file + # error: “PolicyKit files are missing” + # https://github.com/NixOS/nixpkgs/pull/67625#issuecomment-525788428 + PKG_CONFIG_POLKIT_GOBJECT_1_ACTIONDIR = "/run/current-system/sw/share/polkit-1/actions"; + # TODO: wrapGAppsHook wraps efi capsule even though it is not elf dontWrapGApps = true; # so we need to wrap the executables manually @@ -157,11 +259,15 @@ in stdenv.mkDerivation rec { "pki/fwupd-metadata/GPG-KEY-Linux-Vendor-Firmware-Service" "pki/fwupd-metadata/LVFS-CA.pem" ]; + + tests = { + installedTests = nixosTests.fwupd; + }; }; meta = with stdenv.lib; { homepage = https://fwupd.org/; - maintainers = with maintainers; []; + maintainers = with maintainers; [ jtojnar ]; license = [ licenses.gpl2 ]; platforms = platforms.linux; }; diff --git a/pkgs/os-specific/linux/upower/default.nix b/pkgs/os-specific/linux/upower/default.nix index 59e39f72f510..d787acae61b4 100644 --- a/pkgs/os-specific/linux/upower/default.nix +++ b/pkgs/os-specific/linux/upower/default.nix @@ -1,53 +1,58 @@ { stdenv , fetchurl , pkgconfig -, dbus-glib -, intltool , libxslt , docbook_xsl , udev , libgudev , libusb1 +, glib , gobject-introspection -, useSystemd ? true, systemd +, gettext +, systemd +, useIMobileDevice ? true +, libimobiledevice }: stdenv.mkDerivation { pname = "upower"; - version = "0.99.10"; + version = "0.99.11"; + + outputs = [ "out" "dev" ]; src = fetchurl { - url = https://gitlab.freedesktop.org/upower/upower/uploads/c438511024b9bc5a904f8775cfc8e4c4/upower-0.99.10.tar.xz; - sha256 = "17d2bclv5fgma2y3g8bsn9pdvspn1zrzismzdnzfivc0f2wm28k4"; + url = https://gitlab.freedesktop.org/upower/upower/uploads/93cfe7c8d66ed486001c4f3f55399b7a/upower-0.99.11.tar.xz; + sha256 = "1vxxvmz2cxb1qy6ibszaz5bskqdy9nd9fxspj9fv3gfmrjzzzdb4"; }; nativeBuildInputs = [ + docbook_xsl + gettext + gobject-introspection + libxslt pkgconfig ]; buildInputs = [ - dbus-glib - intltool - libxslt - docbook_xsl - udev libgudev libusb1 - gobject-introspection + udev + systemd ] - ++ stdenv.lib.optional useSystemd systemd + ++ stdenv.lib.optional useIMobileDevice libimobiledevice ; + propagatedBuildInputs = [ + glib + ]; + configureFlags = [ - "--with-backend=linux" "--localstatedir=/var" - ] - ++ stdenv.lib.optional useSystemd [ + "--with-backend=linux" "--with-systemdsystemunitdir=${placeholder "out"}/etc/systemd/system" "--with-systemdutildir=${placeholder "out"}/lib/systemd" "--with-udevrulesdir=${placeholder "out"}/lib/udev/rules.d" - ] - ; + ]; doCheck = false; # fails with "env: './linux/integration-test': No such file or directory" |