summary refs log tree commit diff
path: root/pkgs/os-specific/linux/firmware
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/os-specific/linux/firmware')
-rw-r--r--pkgs/os-specific/linux/firmware/firmware-linux-nonfree/default.nix6
-rw-r--r--pkgs/os-specific/linux/firmware/firmware-manager/default.nix38
-rw-r--r--pkgs/os-specific/linux/firmware/fwupd/add-option-for-installation-sysconfdir.patch59
-rw-r--r--pkgs/os-specific/linux/firmware/fwupd/default.nix36
-rw-r--r--pkgs/os-specific/linux/firmware/fwupd/installed-tests-path.patch42
-rw-r--r--pkgs/os-specific/linux/firmware/raspberrypi/default.nix7
-rw-r--r--pkgs/os-specific/linux/firmware/system76-firmware/default.nix39
7 files changed, 184 insertions, 43 deletions
diff --git a/pkgs/os-specific/linux/firmware/firmware-linux-nonfree/default.nix b/pkgs/os-specific/linux/firmware/firmware-linux-nonfree/default.nix
index e480b449007..6938750dd64 100644
--- a/pkgs/os-specific/linux/firmware/firmware-linux-nonfree/default.nix
+++ b/pkgs/os-specific/linux/firmware/firmware-linux-nonfree/default.nix
@@ -2,12 +2,12 @@
 
 stdenv.mkDerivation rec {
   pname = "firmware-linux-nonfree";
-  version = "2020-05-19";
+  version = "2020-11-18";
 
   src = fetchgit {
     url = "https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git";
     rev = lib.replaceStrings ["-"] [""] version;
-    sha256 = "13yrpgfqxp5l457p3s1c61is410nv0kv6picx9r0m8h1b0v6aym3";
+    sha256 = "107p7h13gncsxqhixqq9zmmswvs910sck54ab10s4m5cafvnaf94";
   };
 
   installFlags = [ "DESTDIR=$(out)" ];
@@ -17,7 +17,7 @@ stdenv.mkDerivation rec {
 
   outputHashMode = "recursive";
   outputHashAlgo = "sha256";
-  outputHash = "0pjl70nwarnknxah8vikb051c75mkg25a5m4h3344cw86x8hcx10";
+  outputHash = "1319qr3mhbbvbnl8q151pgfpahwzfv9zg0fvpj34z5h0wnvmlr2v";
 
   meta = with stdenv.lib; {
     description = "Binary firmware collection packaged by kernel.org";
diff --git a/pkgs/os-specific/linux/firmware/firmware-manager/default.nix b/pkgs/os-specific/linux/firmware/firmware-manager/default.nix
new file mode 100644
index 00000000000..e98de6bbe9e
--- /dev/null
+++ b/pkgs/os-specific/linux/firmware/firmware-manager/default.nix
@@ -0,0 +1,38 @@
+{ rustPlatform, lib, fetchFromGitHub, lzma, pkgconfig, openssl, dbus, glib, udev, cairo, pango, atk, gdk-pixbuf, gtk3, wrapGAppsHook }:
+rustPlatform.buildRustPackage rec {
+  pname = "firmware-manager";
+  version = "0.1.1";
+
+  src = fetchFromGitHub {
+    owner = "pop-os";
+    repo = pname;
+    rev = version;
+    sha256 = "0x9604jsflqxvbkfp139mzjicpyx8v21139jj8bp88c14ngvmdlw";
+  };
+
+  nativeBuildInputs = [ pkgconfig wrapGAppsHook ];
+
+  buildInputs = [ lzma openssl dbus glib udev cairo pango atk gdk-pixbuf gtk3 ];
+
+  depsExtraArgs.postPatch = "make prefix='$(out)' toml-gen";
+
+  postPatch = ''
+    sed -i 's|etc|$(prefix)/etc|' Makefile
+  '';
+
+  buildPhase = "make prefix='$(out)'";
+
+  installPhase = "make prefix='$(out)' install";
+
+  cargoSha256 = "0byc0pqa1w2qnfrx3psrzdq1c8qjslbmzxg872b9v6fr5d4c9cvg";
+
+  doCheck = false;
+
+  meta = {
+    description = "Graphical frontend for firmware management";
+    homepage = "https://github.com/pop-os/firmware-manager";
+    license = lib.licenses.gpl3;
+    maintainers = [ lib.maintainers.shlevy ];
+    platforms = lib.platforms.linux;
+  };
+}
diff --git a/pkgs/os-specific/linux/firmware/fwupd/add-option-for-installation-sysconfdir.patch b/pkgs/os-specific/linux/firmware/fwupd/add-option-for-installation-sysconfdir.patch
index a727e5f4a85..6faa6079355 100644
--- a/pkgs/os-specific/linux/firmware/fwupd/add-option-for-installation-sysconfdir.patch
+++ b/pkgs/os-specific/linux/firmware/fwupd/add-option-for-installation-sysconfdir.patch
@@ -1,5 +1,5 @@
 diff --git a/data/meson.build b/data/meson.build
-index bb749fd4..b611875b 100644
+index 14454458..12a798c0 100644
 --- a/data/meson.build
 +++ b/data/meson.build
 @@ -17,7 +17,7 @@ endif
@@ -73,10 +73,10 @@ index 826a3c1d..b78db663 100644
 +  install_dir: join_paths(sysconfdir_install, 'fwupd', 'remotes.d'),
  )
 diff --git a/meson.build b/meson.build
-index 87ea67e5..3a4374db 100644
+index a6fb55dd..aedb7530 100644
 --- a/meson.build
 +++ b/meson.build
-@@ -175,6 +175,12 @@ endif
+@@ -183,6 +183,12 @@ endif
  mandir = join_paths(prefix, get_option('mandir'))
  localedir = join_paths(prefix, get_option('localedir'))
  
@@ -90,19 +90,16 @@ index 87ea67e5..3a4374db 100644
  gio = dependency('gio-2.0', version : '>= 2.45.8')
  giounix = dependency('gio-unix-2.0', version : '>= 2.45.8', required: false)
 diff --git a/meson_options.txt b/meson_options.txt
-index 3da9b6c4..6c80275b 100644
+index 0a0e2853..198ae930 100644
 --- a/meson_options.txt
 +++ b/meson_options.txt
-@@ -24,6 +24,7 @@ option('plugin_coreboot', type : 'boolean', value : true, description : 'enable
- option('systemd', type : 'boolean', value : true, description : 'enable systemd support')
- option('systemdunitdir', type: 'string', value: '', description: 'Directory for systemd units')
- option('elogind', type : 'boolean', value : false, description : 'enable elogind support')
+@@ -1,3 +1,4 @@
 +option('sysconfdir_install', type: 'string', value: '', description: 'sysconfdir to use during installation')
- option('tests', type : 'boolean', value : true, description : 'enable tests')
- option('udevdir', type: 'string', value: '', description: 'Directory for udev rules')
- option('efi-cc', type : 'string', value : 'gcc', description : 'the compiler to use for EFI modules')
+ option('build', type : 'combo', choices : ['all', 'standalone', 'library'], value : 'all', description : 'build type')
+ option('agent', type : 'boolean', value : true, description : 'enable the fwupd agent')
+ option('consolekit', type : 'boolean', value : true, description : 'enable ConsoleKit support')
 diff --git a/plugins/ata/meson.build b/plugins/ata/meson.build
-index 8444bb8a..fa4a8ad1 100644
+index f32b97fe..679ccc7b 100644
 --- a/plugins/ata/meson.build
 +++ b/plugins/ata/meson.build
 @@ -7,7 +7,7 @@ install_data([
@@ -125,11 +122,37 @@ index ed4eee70..76dbdb1d 100644
 -  install_dir: join_paths(sysconfdir, 'fwupd', 'remotes.d'),
 +  install_dir: join_paths(sysconfdir_install, 'fwupd', 'remotes.d'),
  )
+diff --git a/plugins/msr/meson.build b/plugins/msr/meson.build
+index d829e153..e2917bbe 100644
+--- a/plugins/msr/meson.build
++++ b/plugins/msr/meson.build
+@@ -5,7 +5,7 @@ install_data(['msr.quirk'],
+ )
+ 
+ install_data(['fwupd-msr.conf'],
+-  install_dir: join_paths(sysconfdir, 'modules-load.d')
++  install_dir: join_paths(sysconfdir_install, 'modules-load.d')
+ )
+ 
+ shared_module('fu_plugin_msr',
+diff --git a/plugins/platform-integrity/meson.build b/plugins/platform-integrity/meson.build
+index 6f1c4bc5..c5d043fc 100644
+--- a/plugins/platform-integrity/meson.build
++++ b/plugins/platform-integrity/meson.build
+@@ -7,7 +7,7 @@ install_data([
+ )
+ 
+ install_data(['fwupd-platform-integrity.conf'],
+-  install_dir: join_paths(sysconfdir, 'modules-load.d')
++  install_dir: join_paths(sysconfdir_install, 'modules-load.d')
+ )
+ 
+ shared_module('fu_plugin_platform_integrity',
 diff --git a/plugins/redfish/meson.build b/plugins/redfish/meson.build
-index 25fc5c7d..77eb9a83 100644
+index 92762791..08bb37ea 100644
 --- a/plugins/redfish/meson.build
 +++ b/plugins/redfish/meson.build
-@@ -27,7 +27,7 @@ shared_module('fu_plugin_redfish',
+@@ -26,7 +26,7 @@ shared_module('fu_plugin_redfish',
  )
  
  install_data(['redfish.conf'],
@@ -139,10 +162,10 @@ index 25fc5c7d..77eb9a83 100644
  
  if get_option('tests')
 diff --git a/plugins/thunderbolt/meson.build b/plugins/thunderbolt/meson.build
-index 06ab34ee..297a9182 100644
+index 6b2368fb..2bd06fed 100644
 --- a/plugins/thunderbolt/meson.build
 +++ b/plugins/thunderbolt/meson.build
-@@ -46,7 +46,7 @@ executable('tbtfwucli',
+@@ -31,7 +31,7 @@ fu_plugin_thunderbolt = shared_module('fu_plugin_thunderbolt',
  )
  
  install_data(['thunderbolt.conf'],
@@ -152,10 +175,10 @@ index 06ab34ee..297a9182 100644
  # we use functions from 2.52 in the tests
  if get_option('tests') and umockdev.found() and gio.version().version_compare('>= 2.52')
 diff --git a/plugins/uefi/meson.build b/plugins/uefi/meson.build
-index 5838cecc..9ba3d5cd 100644
+index 2d1b2d22..c4217a72 100644
 --- a/plugins/uefi/meson.build
 +++ b/plugins/uefi/meson.build
-@@ -101,7 +101,7 @@ if get_option('man')
+@@ -97,7 +97,7 @@ if get_option('man')
  endif
  
  install_data(['uefi.conf'],
diff --git a/pkgs/os-specific/linux/firmware/fwupd/default.nix b/pkgs/os-specific/linux/firmware/fwupd/default.nix
index d502d049ace..85f5bbbf5b1 100644
--- a/pkgs/os-specific/linux/firmware/fwupd/default.nix
+++ b/pkgs/os-specific/linux/firmware/fwupd/default.nix
@@ -3,6 +3,7 @@
 { stdenv
 , fetchurl
 , fetchpatch
+, fetchFromGitHub
 , substituteAll
 , gtk-doc
 , pkg-config
@@ -88,7 +89,7 @@ let
 
   self = stdenv.mkDerivation rec {
     pname = "fwupd";
-    version = "1.4.6";
+    version = "1.5.1";
 
     # libfwupd goes to lib
     # daemon, plug-ins and libfwupdplugin go to out
@@ -97,7 +98,7 @@ let
 
     src = fetchurl {
       url = "https://people.freedesktop.org/~hughsient/releases/fwupd-${version}.tar.xz";
-      sha256 = "AKG5stioIveQc7ooYb/2UoOaBzbPUFzYk8tZK0rzvK0=";
+      sha256 = "0fpxcl6bighiipyl4qspjhi0lwisrgq8jdahm68mk34rmrx50sgf";
     };
 
     patches = [
@@ -118,6 +119,12 @@ let
         # Needs a different set of modules than po/make-images.
         inherit installedTestsPython;
       })
+
+      # Skip tests requiring network.
+      (fetchpatch {
+        url = "https://github.com/fwupd/fwupd/commit/db15442c7c217610954786bd40779c14ed0e034b.patch";
+        sha256 = "/jzpGMJcqLisjecKpSUfA8ZCU53n7BOPR6tMgEX/qL8=";
+      })
     ];
 
     nativeBuildInputs = [
@@ -229,6 +236,19 @@ let
       addToSearchPath XDG_DATA_DIRS "${shared-mime-info}/share"
     '';
 
+    postInstall =
+      let
+        testFw = fetchFromGitHub {
+          owner = "fwupd";
+          repo = "fwupd-test-firmware";
+          rev = "42b62c62dc85ecfb8e38099fe5de0625af87a722";
+          sha256 = "XUpxE003DZSeLJMtyV5UN5CNHH89/nEVKpCbMStm91Q=";
+        };
+      in ''
+        # These files have weird licenses so they are shipped separately.
+        cp --recursive --dereference "${testFw}/installed-tests/tests" "$installedTests/libexec/installed-tests/fwupd"
+      '';
+
     preFixup = let
       binPath = [
         efibootmgr
@@ -254,6 +274,8 @@ let
       done
     '';
 
+    separateDebugInfo = true;
+
     passthru = {
       filesInstalledToEtc = [
         "fwupd/ata.conf"
@@ -277,8 +299,8 @@ let
         "fwupd/remotes.d/dell-esrt.conf"
       ];
 
-      # BlacklistPlugins key in fwupd/daemon.conf
-      defaultBlacklistedPlugins = [
+      # DisabledPlugins key in fwupd/daemon.conf
+      defaultDisabledPlugins = [
         "test"
         "invalid"
       ];
@@ -302,9 +324,9 @@ let
 
           config = configparser.RawConfigParser()
           config.read('${self}/etc/fwupd/daemon.conf')
-          package_blacklisted_plugins = config.get('fwupd', 'BlacklistPlugins').rstrip(';').split(';')
-          passthru_blacklisted_plugins = ${listToPy passthru.defaultBlacklistedPlugins}
-          assert package_blacklisted_plugins == passthru_blacklisted_plugins, f'Default blacklisted plug-ins in the package {package_blacklisted_plugins} do not match those listed in passthru.defaultBlacklistedPlugins {passthru_blacklisted_plugins}'
+          package_disabled_plugins = config.get('fwupd', 'DisabledPlugins').rstrip(';').split(';')
+          passthru_disabled_plugins = ${listToPy passthru.defaultDisabledPlugins}
+          assert package_disabled_plugins == passthru_disabled_plugins, f'Default disabled plug-ins in the package {package_disabled_plugins} do not match those listed in passthru.defaultDisabledPlugins {passthru_disabled_plugins}'
 
           pathlib.Path(os.getenv('out')).touch()
         '';
diff --git a/pkgs/os-specific/linux/firmware/fwupd/installed-tests-path.patch b/pkgs/os-specific/linux/firmware/fwupd/installed-tests-path.patch
index 432056cbe7f..d8f1a533b82 100644
--- a/pkgs/os-specific/linux/firmware/fwupd/installed-tests-path.patch
+++ b/pkgs/os-specific/linux/firmware/fwupd/installed-tests-path.patch
@@ -1,3 +1,5 @@
+diff --git a/data/device-tests/hardware.py b/data/device-tests/hardware.py
+index 7f1e1907..10fee1b8 100755
 --- a/data/device-tests/hardware.py
 +++ b/data/device-tests/hardware.py
 @@ -1,4 +1,4 @@
@@ -6,25 +8,41 @@
  # pylint: disable=wrong-import-position,too-many-locals,unused-argument,wrong-import-order
  #
  # Copyright (C) 2017 Richard Hughes <richard@hughsie.com>
+diff --git a/data/installed-tests/meson.build b/data/installed-tests/meson.build
+index adadbcdd..1b51bb9c 100644
 --- a/data/installed-tests/meson.build
 +++ b/data/installed-tests/meson.build
-@@ -1,4 +1,4 @@
--installed_test_datadir = join_paths(datadir, 'installed-tests', 'fwupd')
-+installed_test_datadir = join_paths(get_option('installed_test_prefix'), 'share', 'installed-tests', 'fwupd')
- 
- con2 = configuration_data()
- con2.set('installedtestsdir', installed_test_datadir)
-@@ -52,5 +52,5 @@ configure_file(
+@@ -65,5 +65,5 @@ configure_file(
    output : 'fwupd-tests.conf',
    configuration : con2,
    install: true,
 -  install_dir: join_paths(sysconfdir, 'fwupd', 'remotes.d'),
 +  install_dir: join_paths(get_option('installed_test_prefix'), 'etc', 'fwupd', 'remotes.d'),
  )
+diff --git a/meson.build b/meson.build
+index 772b7bbe..f59302cd 100644
+--- a/meson.build
++++ b/meson.build
+@@ -177,8 +177,8 @@ else
+   datadir = join_paths(prefix, get_option('datadir'))
+   sysconfdir = join_paths(prefix, get_option('sysconfdir'))
+   localstatedir = join_paths(prefix, get_option('localstatedir'))
+-  installed_test_bindir = join_paths(libexecdir, 'installed-tests', meson.project_name())
+-  installed_test_datadir = join_paths(datadir, 'installed-tests', meson.project_name())
++  installed_test_bindir = join_paths(get_option('installed_test_prefix'), 'libexec', 'installed-tests', meson.project_name())
++  installed_test_datadir = join_paths(get_option('installed_test_prefix'), 'share', 'installed-tests', meson.project_name())
+ endif
+ mandir = join_paths(prefix, get_option('mandir'))
+ localedir = join_paths(prefix, get_option('localedir'))
+diff --git a/meson_options.txt b/meson_options.txt
+index 0a0e2853..5f68d78b 100644
 --- a/meson_options.txt
 +++ b/meson_options.txt
-@@ -1,3 +1,4 @@
-+option('installed_test_prefix', type: 'string', value: '', description: 'Prefix for installed tests')
- option('build', type : 'combo', choices : ['all', 'standalone', 'library'], value : 'all', description : 'build type')
- option('agent', type : 'boolean', value : true, description : 'enable the fwupd agent')
- option('consolekit', type : 'boolean', value : true, description : 'enable ConsoleKit support')
+@@ -25,6 +26,7 @@ option('plugin_coreboot', type : 'boolean', value : true, description : 'enable
+ option('systemd', type : 'boolean', value : true, description : 'enable systemd support')
+ option('systemd_root_prefix', type: 'string', value: '', description: 'Directory to base systemd’s installation directories on')
+ option('elogind', type : 'boolean', value : false, description : 'enable elogind support')
++option('installed_test_prefix', type: 'string', description: 'Prefix for installed tests')
+ option('tests', type : 'boolean', value : true, description : 'enable tests')
+ option('tpm', type : 'boolean', value : true, description : 'enable TPM support')
+ option('udevdir', type: 'string', value: '', description: 'Directory for udev rules')
diff --git a/pkgs/os-specific/linux/firmware/raspberrypi/default.nix b/pkgs/os-specific/linux/firmware/raspberrypi/default.nix
index 77a28444636..70bcaa15d96 100644
--- a/pkgs/os-specific/linux/firmware/raspberrypi/default.nix
+++ b/pkgs/os-specific/linux/firmware/raspberrypi/default.nix
@@ -2,13 +2,13 @@
 
 stdenv.mkDerivation rec {
   pname = "raspberrypi-firmware";
-  version = "1.20200601";
+  version = "1.20201022";
 
   src = fetchFromGitHub {
     owner = "raspberrypi";
     repo = "firmware";
     rev = version;
-    sha256 = "1vm038f9digwg8gdxl2bypzlip3ycjb6bl56274gh5i9abl6wjvf";
+    sha256 = "0j5m50cmmr11m3h8kk89j1pqkdqr7mzdzg04ayiqvfhvy32qqlg8";
   };
 
   installPhase = ''
@@ -16,11 +16,12 @@ stdenv.mkDerivation rec {
     cp -R boot/* $out/share/raspberrypi/boot
   '';
 
+  dontFixup = true;
+
   meta = with stdenv.lib; {
     description = "Firmware for the Raspberry Pi board";
     homepage = "https://github.com/raspberrypi/firmware";
     license = licenses.unfreeRedistributableFirmware; # See https://github.com/raspberrypi/firmware/blob/master/boot/LICENCE.broadcom
-    platforms = [ "armv6l-linux" "armv7l-linux" "aarch64-linux" ];
     maintainers = with maintainers; [ dezgeg tavyc ];
   };
 }
diff --git a/pkgs/os-specific/linux/firmware/system76-firmware/default.nix b/pkgs/os-specific/linux/firmware/system76-firmware/default.nix
new file mode 100644
index 00000000000..f19af3d10fc
--- /dev/null
+++ b/pkgs/os-specific/linux/firmware/system76-firmware/default.nix
@@ -0,0 +1,39 @@
+{ rustPlatform, lib, fetchFromGitHub, lzma, pkgconfig, openssl, dbus, efibootmgr, makeWrapper }:
+rustPlatform.buildRustPackage rec {
+  pname = "system76-firmware";
+  # Check Makefile when updating, make sure postInstall matches make install
+  version = "1.0.18";
+
+  src = fetchFromGitHub {
+    owner = "pop-os";
+    repo = pname;
+    rev = version;
+    sha256 = "08y65ak3y08xcl1nprwraqv9l65yqnfllbgmxyd2bppjpprwq474";
+  };
+
+  nativeBuildInputs = [ pkgconfig makeWrapper ];
+
+  buildInputs = [ lzma openssl dbus ];
+
+  cargoBuildFlags = [ "--workspace" ];
+
+  cargoSha256 = "00933zkhqd1l29ir2dgp5r1k7g24mlb2k8fmggwzplrwzw1al5h4";
+
+  # Purposefully don't install systemd unit file, that's for NixOS
+  postInstall = ''
+    install -D -m -0644 data/system76-firmware-daemon.conf $out/etc/dbus-1/system.d/system76-firmware-daemon.conf
+
+    for bin in $out/bin/system76-firmware-*
+    do
+      wrapProgram $bin --prefix PATH : "${efibootmgr}/bin"
+    done
+  '';
+
+  meta = {
+    description = "Tools for managing firmware updates for system76 devices";
+    homepage = "https://github.com/pop-os/system76-firmware";
+    license = lib.licenses.gpl3;
+    maintainers = [ lib.maintainers.shlevy ];
+    platforms = lib.platforms.linux;
+  };
+}