freebsd.pciconf: install configuration files
Co-Authored-By: Audrey Dutcher <audrey@rhelmot.io>
This commit is contained in:
co-authored by
Audrey Dutcher
parent
356fcd58ba
commit
97d5cf6833
@@ -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 <<EOF
|
||||
#include <paths.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";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user