From d72a2e7baf39f6683005e66ffcaa9f5e93aaa9da Mon Sep 17 00:00:00 2001 From: Bernardo Meurer Date: Sun, 9 Jan 2022 13:36:20 -0300 Subject: [PATCH] firmwareLinuxNonfree -> linux-firmware This renames our `firmwareLinuxNonfree` package to `linux-firmware`. There is prior art for this in multiple other distros[1][2][3]. Besides making the package more discoverable by those searching for the usual name, this also brings it in-line with the `kebab-case` we normally see in `nixpkgs` pnames, and removes the `Nonfree` information from the name, which I consider redundant given it's present in `meta.license`. The corresponding alias has been added, so this shouldn't break anything. [1]: https://archlinux.org/packages/core/any/linux-firmware/ [2]: https://src.fedoraproject.org/rpms/linux-firmware [3]: https://packages.gentoo.org/packages/sys-kernel/linux-firmware --- .../doc/manual/from_md/release-notes/rl-2205.section.xml | 6 ++++++ nixos/doc/manual/release-notes/rl-2205.section.md | 2 ++ nixos/modules/hardware/all-firmware.nix | 3 +-- .../default.nix | 2 +- pkgs/os-specific/linux/microcode/amd.nix | 8 ++++---- pkgs/top-level/aliases.nix | 1 + pkgs/top-level/all-packages.nix | 2 +- 7 files changed, 16 insertions(+), 8 deletions(-) rename pkgs/os-specific/linux/firmware/{firmware-linux-nonfree => linux-firmware}/default.nix (96%) diff --git a/nixos/doc/manual/from_md/release-notes/rl-2205.section.xml b/nixos/doc/manual/from_md/release-notes/rl-2205.section.xml index 1cfef8254891..67c5a13421b0 100644 --- a/nixos/doc/manual/from_md/release-notes/rl-2205.section.xml +++ b/nixos/doc/manual/from_md/release-notes/rl-2205.section.xml @@ -374,6 +374,12 @@ pkgs.theLoungePlugins.themes. + + + The firmwareLinuxNonfree package has been + renamed to linux-firmware. + + diff --git a/nixos/doc/manual/release-notes/rl-2205.section.md b/nixos/doc/manual/release-notes/rl-2205.section.md index 181630263217..35316a283190 100644 --- a/nixos/doc/manual/release-notes/rl-2205.section.md +++ b/nixos/doc/manual/release-notes/rl-2205.section.md @@ -134,3 +134,5 @@ In addition to numerous new and upgraded packages, this release has the followin is set to `true`. - The option `services.thelounge.plugins` has been added to allow installing plugins for The Lounge. Plugins can be found in `pkgs.theLoungePlugins.plugins` and `pkgs.theLoungePlugins.themes`. + +- The `firmwareLinuxNonfree` package has been renamed to `linux-firmware`. diff --git a/nixos/modules/hardware/all-firmware.nix b/nixos/modules/hardware/all-firmware.nix index ce87f9e8be8a..24d5b7bc2b29 100644 --- a/nixos/modules/hardware/all-firmware.nix +++ b/nixos/modules/hardware/all-firmware.nix @@ -31,7 +31,6 @@ in { type = types.bool; description = '' Turn on this option if you want to enable all the firmware with a license allowing redistribution. - (i.e. free firmware and firmware-linux-nonfree) ''; }; @@ -51,7 +50,7 @@ in { config = mkMerge [ (mkIf (cfg.enableAllFirmware || cfg.enableRedistributableFirmware) { hardware.firmware = with pkgs; [ - firmwareLinuxNonfree + linux-firmware intel2200BGFirmware rtl8192su-firmware rt5677-firmware diff --git a/pkgs/os-specific/linux/firmware/firmware-linux-nonfree/default.nix b/pkgs/os-specific/linux/firmware/linux-firmware/default.nix similarity index 96% rename from pkgs/os-specific/linux/firmware/firmware-linux-nonfree/default.nix rename to pkgs/os-specific/linux/firmware/linux-firmware/default.nix index ebe9b733e3d0..439cfb03a3b1 100644 --- a/pkgs/os-specific/linux/firmware/firmware-linux-nonfree/default.nix +++ b/pkgs/os-specific/linux/firmware/linux-firmware/default.nix @@ -1,7 +1,7 @@ { stdenvNoCC, fetchgit, lib }: stdenvNoCC.mkDerivation rec { - pname = "firmware-linux-nonfree"; + pname = "linux-firmware"; version = "20211216"; src = fetchgit { diff --git a/pkgs/os-specific/linux/microcode/amd.nix b/pkgs/os-specific/linux/microcode/amd.nix index 72f413f9cb66..cdb2912c4af6 100644 --- a/pkgs/os-specific/linux/microcode/amd.nix +++ b/pkgs/os-specific/linux/microcode/amd.nix @@ -1,9 +1,9 @@ -{ lib, stdenv, firmwareLinuxNonfree, libarchive }: +{ lib, stdenv, linux-firmware, libarchive }: stdenv.mkDerivation { - name = "amd-ucode-${firmwareLinuxNonfree.version}"; + name = "amd-ucode-${linux-firmware.version}"; - src = firmwareLinuxNonfree; + src = linux-firmware; sourceRoot = "."; @@ -11,7 +11,7 @@ stdenv.mkDerivation { buildPhase = '' mkdir -p kernel/x86/microcode - find ${firmwareLinuxNonfree}/lib/firmware/amd-ucode -name \*.bin \ + find ${linux-firmware}/lib/firmware/amd-ucode -name \*.bin \ -exec sh -c 'cat {} >> kernel/x86/microcode/AuthenticAMD.bin' \; ''; diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix index a3edb07ffbbb..823e6976a02d 100644 --- a/pkgs/top-level/aliases.nix +++ b/pkgs/top-level/aliases.nix @@ -262,6 +262,7 @@ mapAliases ({ firefoxWrapper = firefox; # 2015-09 firestr = throw "firestr has been removed."; # added 2019-12-08 + firmwareLinuxNonfree = linux-firmware; # added 2022-01-09 fish-foreign-env = throw "fish-foreign-env has been replaced with fishPlugins.foreign-env"; # added 2020-12-29, modified 2021-01-10 flameGraph = flamegraph; # added 2018-04-25 flashplayer = throw "flashplayer has been removed as Adobe Flash Player is now deprecated."; # added 2021-02-07 diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 4342edbe07b8..0dadd8328b37 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -22786,7 +22786,7 @@ with pkgs; qemu_test = lowPrio (qemu.override { hostCpuOnly = true; nixosTestRunner = true; }); - firmwareLinuxNonfree = callPackage ../os-specific/linux/firmware/firmware-linux-nonfree { }; + linux-firmware = callPackage ../os-specific/linux/firmware/linux-firmware { }; qmk-udev-rules = callPackage ../os-specific/linux/qmk-udev-rules { };