nongnu: nvidia-libs: Simplify inputs.
* nongnu/packages/nvidia.scm (nvidia-libs): Simplify-inputs. Use gexp. [arguments]: Make adjustments due to inputs. Use gexp.
This commit is contained in:
parent
9cf7157308
commit
b38370eb80
|
@ -298,14 +298,12 @@ Further xorg should be configured by adding:
|
||||||
(file-name (string-append "nvidia-driver-" version "-checkout"))))
|
(file-name (string-append "nvidia-driver-" version "-checkout"))))
|
||||||
(build-system copy-build-system)
|
(build-system copy-build-system)
|
||||||
(arguments
|
(arguments
|
||||||
`(#:phases
|
(list #:phases
|
||||||
(modify-phases %standard-phases
|
#~(modify-phases %standard-phases
|
||||||
(replace 'unpack
|
(replace 'unpack
|
||||||
(lambda* (#:key inputs #:allow-other-keys #:rest r)
|
(lambda* (#:key inputs #:allow-other-keys #:rest r)
|
||||||
(let ((source (assoc-ref inputs "source")))
|
(invoke "sh" #$source "--extract-only")
|
||||||
(invoke "sh" source "--extract-only")
|
(chdir (format #f "NVIDIA-Linux-x86_64-~a" #$nvidia-version))))
|
||||||
(chdir ,(format #f "NVIDIA-Linux-x86_64-~a" version))
|
|
||||||
#t)))
|
|
||||||
(delete 'build)
|
(delete 'build)
|
||||||
(delete 'check)
|
(delete 'check)
|
||||||
(add-after 'install 'patch-symlink
|
(add-after 'install 'patch-symlink
|
||||||
|
@ -313,31 +311,30 @@ Further xorg should be configured by adding:
|
||||||
(use-modules (ice-9 ftw)
|
(use-modules (ice-9 ftw)
|
||||||
(ice-9 regex)
|
(ice-9 regex)
|
||||||
(ice-9 textual-ports))
|
(ice-9 textual-ports))
|
||||||
(let* ((out (assoc-ref outputs "out"))
|
(let* ((libdir (string-append #$output "/lib"))
|
||||||
(libdir (string-append out "/lib"))
|
(bindir (string-append #$output "/bin"))
|
||||||
(bindir (string-append out "/bin"))
|
(etcdir (string-append #$output "/etc")))
|
||||||
(etcdir (string-append out "/etc")))
|
|
||||||
;; ------------------------------
|
;; ------------------------------
|
||||||
;; patchelf
|
;; patchelf
|
||||||
(let* ((libc (assoc-ref inputs "libc"))
|
(let* ((libc (assoc-ref inputs "libc"))
|
||||||
(ld.so (string-append libc ,(glibc-dynamic-linker)))
|
(ld-so (string-append #$glibc
|
||||||
|
#$(glibc-dynamic-linker)))
|
||||||
|
|
||||||
(out (assoc-ref outputs "out"))
|
|
||||||
(rpath (string-join
|
(rpath (string-join
|
||||||
(list "$ORIGIN"
|
(list "$ORIGIN"
|
||||||
(string-append out "/lib")
|
(string-append #$output "/lib")
|
||||||
(string-append libc "/lib")
|
(string-append #$glibc "/lib")
|
||||||
(string-append (assoc-ref inputs "atk") "/lib")
|
(string-append #$atk "/lib")
|
||||||
(string-append (assoc-ref inputs "cairo") "/lib")
|
(string-append #$cairo "/lib")
|
||||||
(string-append (assoc-ref inputs "gcc:lib") "/lib")
|
(string-append #$gcc:lib "/lib")
|
||||||
(string-append (assoc-ref inputs "gdk-pixbuf") "/lib")
|
(string-append #$gdk-pixbuf "/lib")
|
||||||
(string-append (assoc-ref inputs "glib") "/lib")
|
(string-append #$glib "/lib")
|
||||||
(string-append (assoc-ref inputs "gtk+") "/lib")
|
(string-append #$gtk+ "/lib")
|
||||||
(string-append (assoc-ref inputs "gtk2") "/lib")
|
(string-append #$gtk+-2 "/lib")
|
||||||
(string-append (assoc-ref inputs "libx11") "/lib")
|
(string-append #$libx11 "/lib")
|
||||||
(string-append (assoc-ref inputs "libxext") "/lib")
|
(string-append #$libxext "/lib")
|
||||||
(string-append (assoc-ref inputs "pango") "/lib")
|
(string-append #$pango "/lib")
|
||||||
(string-append (assoc-ref inputs "wayland") "/lib"))
|
(string-append #$wayland "/lib"))
|
||||||
":")))
|
":")))
|
||||||
(define (patch-elf file)
|
(define (patch-elf file)
|
||||||
(format #t "Patching ~a ...~%" file)
|
(format #t "Patching ~a ...~%" file)
|
||||||
|
@ -345,9 +342,10 @@ Further xorg should be configured by adding:
|
||||||
(invoke "patchelf" "--set-interpreter" ld.so file))
|
(invoke "patchelf" "--set-interpreter" ld.so file))
|
||||||
(invoke "patchelf" "--set-rpath" rpath file))
|
(invoke "patchelf" "--set-rpath" rpath file))
|
||||||
(for-each (lambda (file)
|
(for-each (lambda (file)
|
||||||
|
(display (string-append "File: " file))
|
||||||
(when (elf-file? file)
|
(when (elf-file? file)
|
||||||
(patch-elf file)))
|
(patch-elf file)))
|
||||||
(find-files out ".*\\.so")))
|
(find-files #$output ".*\\.so")))
|
||||||
|
|
||||||
;; ------------------------------
|
;; ------------------------------
|
||||||
;; Create short name symbolic links
|
;; Create short name symbolic links
|
||||||
|
@ -375,32 +373,31 @@ Further xorg should be configured by adding:
|
||||||
(when (not (file-exists? mid-file))
|
(when (not (file-exists? mid-file))
|
||||||
(format #t "Linking ~a to ~a ...~%" mid file)
|
(format #t "Linking ~a to ~a ...~%" mid file)
|
||||||
(symlink (basename file) mid-file))))
|
(symlink (basename file) mid-file))))
|
||||||
(find-files libdir "\\.so\\."))
|
(find-files libdir "\\.so\\."))))))
|
||||||
#t))))
|
|
||||||
#:install-plan
|
#:install-plan
|
||||||
,@(match (%current-system)
|
(match (%current-system)
|
||||||
("x86_64-linux" '(`(("." "lib" #:include-regexp ("^./[^/]+\\.so")))))
|
("x86_64-linux" #~`(("." "lib" #:include-regexp ("^./[^/]+\\.so"))))
|
||||||
("i686-linux" '(`(("32" "lib" #:include-regexp ("^./[^/]+\\.so")))))
|
("i686-linux" #~`(("32" "lib" #:include-regexp ("^./[^/]+\\.so"))))
|
||||||
(_ '()))))
|
(_ '()))))
|
||||||
(supported-systems '("i686-linux" "x86_64-linux"))
|
(supported-systems '("i686-linux" "x86_64-linux"))
|
||||||
(native-inputs
|
(native-inputs
|
||||||
`(("patchelf" ,patchelf)
|
(list patchelf
|
||||||
("perl" ,perl)
|
perl
|
||||||
("python" ,python-2)
|
python-2
|
||||||
("which" ,which)
|
which
|
||||||
("xz" ,xz)))
|
xz))
|
||||||
(inputs
|
(inputs
|
||||||
`(("atk" ,atk)
|
(list atk
|
||||||
("cairo" ,cairo)
|
cairo
|
||||||
("gcc:lib" ,gcc "lib")
|
`(,gcc "lib")
|
||||||
("gdk-pixbuf" ,gdk-pixbuf)
|
gdk-pixbuf
|
||||||
("glib" ,glib)
|
glib
|
||||||
("gtk+" ,gtk+)
|
gtk+
|
||||||
("gtk2" ,gtk+-2)
|
gtk+-2
|
||||||
("libc" ,glibc)
|
glibc
|
||||||
("libx11" ,libx11)
|
libx11
|
||||||
("libxext" ,libxext)
|
libxext
|
||||||
("wayland" ,wayland)))
|
wayland))
|
||||||
(home-page "https://www.nvidia.com")
|
(home-page "https://www.nvidia.com")
|
||||||
(synopsis "Libraries of the proprietary Nvidia driver")
|
(synopsis "Libraries of the proprietary Nvidia driver")
|
||||||
(description "These are the libraries of the evil Nvidia driver compatible
|
(description "These are the libraries of the evil Nvidia driver compatible
|
||||||
|
|
Loading…
Reference in New Issue
Block a user