From 12104c6ed1c7d718e23291317a6c8b5879e5274f Mon Sep 17 00:00:00 2001 From: Hilton Chain Date: Sat, 1 Oct 2022 11:02:35 +0800 Subject: nongnu: nvidia-libs: Remove package. * nongnu/packages/nvidia.scm (nvidia-libs): Remove package definition and deprecate the variable. Co-authored-by: Jonathan Brielmaier Signed-off-by: Jonathan Brielmaier --- nongnu/packages/nvidia.scm | 125 +-------------------------------------------- 1 file changed, 2 insertions(+), 123 deletions(-) diff --git a/nongnu/packages/nvidia.scm b/nongnu/packages/nvidia.scm index 4d076c9..dcd9266 100644 --- a/nongnu/packages/nvidia.scm +++ b/nongnu/packages/nvidia.scm @@ -25,6 +25,7 @@ (define-module (nongnu packages nvidia) #:use-module (guix packages) + #:use-module (guix deprecation) #:use-module (guix download) #:use-module (guix gexp) #:use-module (guix git-download) @@ -364,129 +365,7 @@ simultaneous NVML calls from multiple threads.") (license (license:nonfree "file://COPYRIGHT.txt")))) (define-public nvidia-libs - (package - (name "nvidia-libs") - (version nvidia-version) - (source - (origin - (uri (format #f "http://us.download.nvidia.com/XFree86/Linux-x86_64/~a/~a.run" - version - (format #f "NVIDIA-Linux-x86_64-~a" version))) - (sha256 (base32 "0krwcxc0j19vjnk8sv6mx1lin2rm8hcfhc2hg266846jvcws1dsg")) - (method url-fetch) - (file-name (string-append "nvidia-driver-" version "-checkout")))) - (build-system copy-build-system) - (arguments - `(#:phases - (modify-phases %standard-phases - (replace 'unpack - (lambda* (#:key inputs #:allow-other-keys #:rest r) - (let ((source (assoc-ref inputs "source"))) - (invoke "sh" source "--extract-only") - (chdir ,(format #f "NVIDIA-Linux-x86_64-~a" version)) - #t))) - (delete 'build) - (delete 'check) - (add-after 'install 'patch-symlink - (lambda* (#:key inputs native-inputs outputs #:allow-other-keys) - (use-modules (ice-9 ftw) - (ice-9 regex) - (ice-9 textual-ports)) - (let* ((out (assoc-ref outputs "out")) - (libdir (string-append out "/lib")) - (bindir (string-append out "/bin")) - (etcdir (string-append out "/etc"))) - ;; ------------------------------ - ;; patchelf - (let* ((libc (assoc-ref inputs "libc")) - (ld.so (string-append libc ,(glibc-dynamic-linker))) - - (out (assoc-ref outputs "out")) - (rpath (string-join - (list "$ORIGIN" - (string-append out "/lib") - (string-append libc "/lib") - (string-append (assoc-ref inputs "atk") "/lib") - (string-append (assoc-ref inputs "cairo") "/lib") - (string-append (assoc-ref inputs "gcc:lib") "/lib") - (string-append (assoc-ref inputs "gdk-pixbuf") "/lib") - (string-append (assoc-ref inputs "glib") "/lib") - (string-append (assoc-ref inputs "gtk+") "/lib") - (string-append (assoc-ref inputs "gtk2") "/lib") - (string-append (assoc-ref inputs "libx11") "/lib") - (string-append (assoc-ref inputs "libxext") "/lib") - (string-append (assoc-ref inputs "pango") "/lib") - (string-append (assoc-ref inputs "wayland") "/lib")) - ":"))) - (define (patch-elf file) - (format #t "Patching ~a ...~%" file) - (unless (string-contains file ".so") - (invoke "patchelf" "--set-interpreter" ld.so file)) - (invoke "patchelf" "--set-rpath" rpath file)) - (for-each (lambda (file) - (when (elf-file? file) - (patch-elf file))) - (find-files out ".*\\.so"))) - - ;; ------------------------------ - ;; Create short name symbolic links - (for-each (lambda (file) - (let* ((short (regexp-substitute - #f - - (string-match "([^/]*\\.so).*" file) - 1)) - (major (cond - ((or (string=? short "libGLX.so") - (string=? short "libGLX_nvidia.so") - (string=? short "libEGL_nvidia.so")) "0") - ((string=? short "libGLESv2.so") "2") - (else "1"))) - (mid (string-append short "." major)) - (short-file (string-append libdir "/" short)) - (mid-file (string-append libdir "/" mid))) - ;; FIXME the same name, print out warning at least - ;; [X] libEGL.so.1.1.0 - ;; [ ] libEGL.so.435.21 - (when (not (file-exists? short-file)) - (format #t "Linking ~a to ~a ...~%" short file) - (symlink (basename file) short-file)) - (when (not (file-exists? mid-file)) - (format #t "Linking ~a to ~a ...~%" mid file) - (symlink (basename file) mid-file)))) - (find-files libdir "\\.so\\.")) - #t)))) - #:install-plan - ,@(match (%current-system) - ("x86_64-linux" '(`(("." "lib" #:include-regexp ("^./[^/]+\\.so"))))) - ("i686-linux" '(`(("32" "lib" #:include-regexp ("^./[^/]+\\.so"))))) - (_ '())))) - (supported-systems '("i686-linux" "x86_64-linux")) - (native-inputs - `(("patchelf" ,patchelf) - ("perl" ,perl) - ("python" ,python-2) - ("which" ,which) - ("xz" ,xz))) - (inputs - `(("atk" ,atk) - ("cairo" ,cairo) - ("gcc:lib" ,gcc "lib") - ("gdk-pixbuf" ,gdk-pixbuf) - ("glib" ,glib) - ("gtk+" ,gtk+) - ("gtk2" ,gtk+-2) - ("libc" ,glibc) - ("libx11" ,libx11) - ("libxext" ,libxext) - ("wayland" ,wayland))) - (home-page "https://www.nvidia.com") - (synopsis "Libraries of the proprietary Nvidia driver") - (description "These are the libraries of the evil Nvidia driver compatible -with the ones usually provided by Mesa. To use these libraries with -packages that have been compiled with a mesa output, take a look at the nvda -package.") - (license (license:nonfree (format #f "file:///share/doc/nvidia-driver-~a/LICENSE" version))))) + (deprecated-package "nvidia-libs" nvidia-driver)) (define-public nvidia-module (package -- cgit v1.2.3