libnvidia-container: remove go from closure

This commit is contained in:
Kirill Radzikhovskyy 2022-10-14 10:32:07 +11:00 committed by Yt
parent b88383070a
commit 789d6ffbd9

View File

@ -10,6 +10,7 @@
, libtirpc
, makeWrapper
, substituteAll
, removeReferencesTo
, go
}:
let
@ -86,7 +87,7 @@ stdenv.mkDerivation rec {
NIX_CFLAGS_COMPILE = [ "-I${libtirpc.dev}/include/tirpc" ];
NIX_LDFLAGS = [ "-L${libtirpc.dev}/lib" "-ltirpc" ];
nativeBuildInputs = [ pkg-config go rpcsvc-proto makeWrapper ];
nativeBuildInputs = [ pkg-config go rpcsvc-proto makeWrapper removeReferencesTo ];
buildInputs = [ libelf libcap libseccomp libtirpc ];
@ -105,8 +106,10 @@ stdenv.mkDerivation rec {
libraryPath = lib.makeLibraryPath [ "$out" driverLink "${driverLink}-32" ];
in
''
remove-references-to -t "${go}" $out/lib/libnvidia-container-go.so.1.9.0
wrapProgram $out/bin/nvidia-container-cli --prefix LD_LIBRARY_PATH : ${libraryPath}
'';
disallowedReferences = [ go ];
meta = with lib; {
homepage = "https://github.com/NVIDIA/libnvidia-container";