diff --git a/pkgs/os-specific/bsd/freebsd/pkgs/pciconf.nix b/pkgs/os-specific/bsd/freebsd/pkgs/pciconf.nix index a2e5b03d2e22..fc925e46ec09 100644 --- a/pkgs/os-specific/bsd/freebsd/pkgs/pciconf.nix +++ b/pkgs/os-specific/bsd/freebsd/pkgs/pciconf.nix @@ -1,6 +1,7 @@ { lib, mkDerivation, + pciutils, }: mkDerivation { path = "usr.sbin/pciconf"; @@ -11,6 +12,22 @@ mkDerivation { "debug" ]; + postPatch = '' + cat >usr.sbin/pciconf/pathnames.h < + + #define _PATH_DEVPCI "/dev/pci" + #define _PATH_PCIVDB "$out/share/pci.ids" + #define _PATH_LPCIVDB "/red/herring" + + EOF + ''; + + postInstall = '' + mkdir -p $out/share/misc + cp "${pciutils}/share/pci.ids" "$out/share/pci.ids" + ''; + meta.platorms = lib.platforms.freebsd; meta.mainProgram = "pciconf"; }