Skip to content

Commit

Permalink
pciutils: use standardized equivalent for canonicalize_file_name
Browse files Browse the repository at this point in the history
Fixes w/musl.
  • Loading branch information
dtzWill committed Jul 9, 2018
1 parent 92609ec commit f8db20f
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions pkgs/tools/system/pciutils/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,16 @@ stdenv.mkDerivation rec {

installTargets = "install install-lib";

# Use standardized and equivalent realpath(path, NULL) instead of canonicalize_file_name(path).
# This is documented to be equivalent, see `man 3 canonicalize_file_name`.
# Fixes w/musl.
# Upstream PR: https://github.com/pciutils/pciutils/pull/6
postPatch = ''
substituteInPlace lib/sysfs.c \
--replace "canonicalize_file_name(path)" \
"realpath(path, NULL)"
'';

# Get rid of update-pciids as it won't work.
postInstall = "rm $out/sbin/update-pciids $out/man/man8/update-pciids.8";

Expand Down

0 comments on commit f8db20f

Please sign in to comment.