Skip to content

Commit

Permalink
overlays: fix libnvidia-container library symlinks
Browse files Browse the repository at this point in the history
This pulls in an upstream PR that fixes the output paths of
libnvidia-container to not include dangling symlinks, which otherwise
confuses nvidia-container-toolkit.
  • Loading branch information
msanft committed Jan 20, 2025
1 parent 56b29b3 commit c87ddf9
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions overlays/nixpkgs.nix
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,19 @@ final: prev:
--set SOURCE_DATE_EPOCH 0
'';
});

# Fixes a dangling symlink in the libnvidia-container package that confuses
# the nvidia-container-toolkit.
# TODO(msanft): Remove once https://github.com/NixOS/nixpkgs/pull/375291 is merged and
# pulled into Contrast.
libnvidia-container = prev.libnvidia-container.overrideAttrs (prev: {
postFixup = ''
# Recreate library symlinks which ldconfig would have created
for lib in libnvidia-container libnvidia-container-go; do
rm -f "$out/lib/$lib.so"
ln -s "$out/lib/$lib.so.${prev.version}" "$out/lib/$lib.so.1"
ln -s "$out/lib/$lib.so.1" "$out/lib/$lib.so"
done
'';
});
}

0 comments on commit c87ddf9

Please sign in to comment.