From d9a5c6fa604688daf2a383de957be4b2ddf7d826 Mon Sep 17 00:00:00 2001 From: Ingo Blechschmidt Date: Mon, 15 Feb 2021 09:22:01 +0100 Subject: [PATCH 1/2] hwdata: remove restriction to platforms.linux hwdata is just a collection of (plain-text) databases and hence makes sense on any platform. The impetus for this commit was #112644, where we wanted to change pciutils so that it uses the database from hwdata. At this time, pciutils was marked as platforms.unix but hwdata only as platforms.linux. --- pkgs/os-specific/linux/hwdata/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/os-specific/linux/hwdata/default.nix b/pkgs/os-specific/linux/hwdata/default.nix index a3d8fd04261..bd52f37e62f 100644 --- a/pkgs/os-specific/linux/hwdata/default.nix +++ b/pkgs/os-specific/linux/hwdata/default.nix @@ -24,7 +24,7 @@ stdenv.mkDerivation rec { meta = { homepage = "https://github.com/vcrhonek/hwdata"; description = "Hardware Database, including Monitors, pci.ids, usb.ids, and video cards"; - license = lib.licenses.gpl2; - platforms = lib.platforms.linux; + license = lib.licenses.gpl2Plus; + platforms = lib.platforms.all; }; } From 4e54c31de06dd955922cdb1cb59324efd64d8ef0 Mon Sep 17 00:00:00 2001 From: Ingo Blechschmidt Date: Sun, 14 Feb 2021 21:22:13 +0100 Subject: [PATCH 2/2] pciutils: use database from hwinfo which is easier to update --- pkgs/tools/system/pciutils/default.nix | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/system/pciutils/default.nix b/pkgs/tools/system/pciutils/default.nix index a89de032abd..af9ef68dc24 100644 --- a/pkgs/tools/system/pciutils/default.nix +++ b/pkgs/tools/system/pciutils/default.nix @@ -1,4 +1,5 @@ { lib, stdenv, fetchurl, pkg-config, zlib, kmod, which +, hwdata , static ? stdenv.hostPlatform.isStatic , darwin ? null }: @@ -30,8 +31,15 @@ stdenv.mkDerivation rec { installTargets = [ "install" "install-lib" ]; - # Get rid of update-pciids as it won't work. - postInstall = "rm $out/sbin/update-pciids $out/man/man8/update-pciids.8"; + postInstall = '' + # Remove update-pciids as it won't work on nixos + rm $out/sbin/update-pciids $out/man/man8/update-pciids.8 + + # use database from hwdata instead + # (we don't create a symbolic link because we do not want to pull in the + # full closure of hwdata) + cp --reflink=auto ${hwdata}/share/hwdata/pci.ids $out/share/pci.ids + ''; meta = with lib; { homepage = "http://mj.ucw.cz/pciutils.html";