3
0
Fork 0
forked from mirrors/nixpkgs

nvidiaCtkPackages: init

...this way we expose and allow overriding the symlinkJoin constituent components

(cherry picked from commit 1142433e70881b546e2ca5db87792f08829f02ce)
This commit is contained in:
Someone Serge 2024-01-03 22:55:43 +00:00
parent 88f438fc5f
commit 336e2218e0
No known key found for this signature in database
GPG key ID: 7B0E3B1390D61DA4
2 changed files with 47 additions and 25 deletions

View file

@ -0,0 +1,40 @@
{
lib,
newScope,
docker,
libnvidia-container,
runc,
symlinkJoin,
}:
lib.makeScope newScope (
self: {
nvidia-container-toolkit-docker = self.callPackage ./. {
containerRuntimePath = "${docker}/libexec/docker/docker";
configTemplate = ../nvidia-docker/config.toml;
};
nvidia-container-toolkit-podman = self.nvidia-container-toolkit-docker.override {
containerRuntimePath = lib.getExe runc;
configTemplate = ../nvidia-podman/config.toml;
};
nvidia-docker = symlinkJoin {
name = "nvidia-docker";
paths = [
libnvidia-container
self.nvidia-docker-unwrapped
self.nvidia-container-toolkit-docker
];
};
nvidia-docker-unwrapped = self.callPackage ../nvidia-docker { };
nvidia-podman = symlinkJoin {
name = "nvidia-podman";
paths = [
libnvidia-container
self.nvidia-container-toolkit-podman
];
};
}
)

View file

@ -24182,31 +24182,13 @@ with pkgs;
nv-codec-headers-11 = callPackage ../development/libraries/nv-codec-headers/11_x.nix { }; nv-codec-headers-11 = callPackage ../development/libraries/nv-codec-headers/11_x.nix { };
nv-codec-headers-12 = callPackage ../development/libraries/nv-codec-headers/12_x.nix { }; nv-codec-headers-12 = callPackage ../development/libraries/nv-codec-headers/12_x.nix { };
mkNvidiaContainerPkg = { name, containerRuntimePath, configTemplate, additionalPaths ? [] }: nvidiaCtkPackages =
let callPackage ../applications/virtualization/nvidia-container-toolkit/packages.nix
nvidia-container-toolkit = callPackage ../applications/virtualization/nvidia-container-toolkit { { };
inherit containerRuntimePath configTemplate; inherit (nvidiaCtkPackages)
}; nvidia-docker
in symlinkJoin { nvidia-podman
inherit name; ;
paths = [
libnvidia-container
nvidia-container-toolkit
] ++ additionalPaths;
};
nvidia-docker = mkNvidiaContainerPkg {
name = "nvidia-docker";
containerRuntimePath = "${docker}/libexec/docker/docker";
configTemplate = ../applications/virtualization/nvidia-docker/config.toml;
additionalPaths = [ (callPackage ../applications/virtualization/nvidia-docker { }) ];
};
nvidia-podman = mkNvidiaContainerPkg {
name = "nvidia-podman";
containerRuntimePath = "${runc}/bin/runc";
configTemplate = ../applications/virtualization/nvidia-podman/config.toml;
};
nvidia-vaapi-driver = lib.hiPrio (callPackage ../development/libraries/nvidia-vaapi-driver { }); nvidia-vaapi-driver = lib.hiPrio (callPackage ../development/libraries/nvidia-vaapi-driver { });