Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

This file was deleted.

64 changes: 0 additions & 64 deletions pkgs/development/cuda-modules/setup-hooks/auto-fix-elf-files.sh

This file was deleted.

30 changes: 6 additions & 24 deletions pkgs/development/cuda-modules/setup-hooks/extension.nix
Copy link
Contributor Author

@SomeoneSerge SomeoneSerge Apr 3, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Checking paths: pkgs/development/cuda-modules pkgs/test/cuda pkgs/top-level/cuda-packages.nix 
pkgs/development/cuda-modules/setup-hooks/extension.nix: not formatted

😍 😍 😍

Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
final: _: {
# Helper hook used in both autoAddCudaCompatRunpath and
# autoAddDriverRunpath that applies a generic patching action to all elf
# files with a dynamic linking section.
autoFixElfFiles = final.callPackage (
{ makeSetupHook }: makeSetupHook { name = "auto-fix-elf-files"; } ./auto-fix-elf-files.sh
) { };
# TODO:
# - Move to cuda-modules/aliases.nix once
# https://github.com/NixOS/nixpkgs/issues/141803 is ready.
# - Consider removing after 24.11.
inherit (final.pkgs) autoAddDriverRunpath autoFixElfFiles;
autoAddOpenGLRunpathHook = final.autoAddDriverRunpath;

# Internal hook, used by cudatoolkit and cuda redist packages
# to accommodate automatic CUDAToolkit_ROOT construction
Expand Down Expand Up @@ -32,24 +32,6 @@ final: _: {
) { }
);

autoAddDriverRunpath = final.callPackage (
{
addDriverRunpath,
autoFixElfFiles,
makeSetupHook,
}:
makeSetupHook {
name = "auto-add-opengl-runpath-hook";
propagatedBuildInputs = [
addDriverRunpath
autoFixElfFiles
];
} ./auto-add-driver-runpath-hook.sh
) { };

# Deprecated: an alias kept for compatibility. Consider removing after 24.11
autoAddOpenGLRunpathHook = final.autoAddDriverRunpath;

# autoAddCudaCompatRunpath hook must be added AFTER `setupCudaHook`. Both
# hooks prepend a path with `libcuda.so` to the `DT_RUNPATH` section of
# patched elf files, but `cuda_compat` path must take precedence (otherwise,
Expand Down