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"))))
|
||||
(build-system copy-build-system)
|
||||
(arguments
|
||||
`(#:phases
|
||||
(modify-phases %standard-phases
|
||||
(list #: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)))
|
||||
(invoke "sh" #$source "--extract-only")
|
||||
(chdir (format #f "NVIDIA-Linux-x86_64-~a" #$nvidia-version))))
|
||||
(delete 'build)
|
||||
(delete 'check)
|
||||
(add-after 'install 'patch-symlink
|
||||
|
@ -313,31 +311,30 @@ Further xorg should be configured by adding:
|
|||
(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")))
|
||||
(let* ((libdir (string-append #$output "/lib"))
|
||||
(bindir (string-append #$output "/bin"))
|
||||
(etcdir (string-append #$output "/etc")))
|
||||
;; ------------------------------
|
||||
;; patchelf
|
||||
(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
|
||||
(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"))
|
||||
(string-append #$output "/lib")
|
||||
(string-append #$glibc "/lib")
|
||||
(string-append #$atk "/lib")
|
||||
(string-append #$cairo "/lib")
|
||||
(string-append #$gcc:lib "/lib")
|
||||
(string-append #$gdk-pixbuf "/lib")
|
||||
(string-append #$glib "/lib")
|
||||
(string-append #$gtk+ "/lib")
|
||||
(string-append #$gtk+-2 "/lib")
|
||||
(string-append #$libx11 "/lib")
|
||||
(string-append #$libxext "/lib")
|
||||
(string-append #$pango "/lib")
|
||||
(string-append #$wayland "/lib"))
|
||||
":")))
|
||||
(define (patch-elf 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-rpath" rpath file))
|
||||
(for-each (lambda (file)
|
||||
(display (string-append "File: " file))
|
||||
(when (elf-file? file)
|
||||
(patch-elf file)))
|
||||
(find-files out ".*\\.so")))
|
||||
(find-files #$output ".*\\.so")))
|
||||
|
||||
;; ------------------------------
|
||||
;; Create short name symbolic links
|
||||
|
@ -375,32 +373,31 @@ Further xorg should be configured by adding:
|
|||
(when (not (file-exists? mid-file))
|
||||
(format #t "Linking ~a to ~a ...~%" mid file)
|
||||
(symlink (basename file) mid-file))))
|
||||
(find-files libdir "\\.so\\."))
|
||||
#t))))
|
||||
(find-files libdir "\\.so\\."))))))
|
||||
#:install-plan
|
||||
,@(match (%current-system)
|
||||
("x86_64-linux" '(`(("." "lib" #:include-regexp ("^./[^/]+\\.so")))))
|
||||
("i686-linux" '(`(("32" "lib" #:include-regexp ("^./[^/]+\\.so")))))
|
||||
(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)))
|
||||
(list patchelf
|
||||
perl
|
||||
python-2
|
||||
which
|
||||
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)))
|
||||
(list atk
|
||||
cairo
|
||||
`(,gcc "lib")
|
||||
gdk-pixbuf
|
||||
glib
|
||||
gtk+
|
||||
gtk+-2
|
||||
glibc
|
||||
libx11
|
||||
libxext
|
||||
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
|
||||
|
|
Loading…
Reference in New Issue
Block a user