parent
9264265c7b
commit
b008d601ce
|
@ -4,13 +4,16 @@
|
||||||
#:use-module (guix packages)
|
#:use-module (guix packages)
|
||||||
#:use-module ((gnu packages base)
|
#:use-module ((gnu packages base)
|
||||||
#:prefix gnu:)
|
#:prefix gnu:)
|
||||||
#:use-module ((gnu packages lua)
|
|
||||||
#:prefix gnu:)
|
|
||||||
#:use-module ((gnu packages video)
|
#:use-module ((gnu packages video)
|
||||||
#:prefix gnu:)
|
#:prefix gnu:)
|
||||||
#:use-module ((gnu packages audio)
|
#:use-module ((gnu packages audio)
|
||||||
#:prefix gnu:)
|
#:prefix gnu:)
|
||||||
#:replace (lua-5.4 ffmpeg-7 ffmpeg))
|
#:replace (ffmpeg-7 ffmpeg))
|
||||||
|
|
||||||
|
|
||||||
|
;;
|
||||||
|
;; Utils
|
||||||
|
;;
|
||||||
|
|
||||||
(define rewrite-rules
|
(define rewrite-rules
|
||||||
'())
|
'())
|
||||||
|
@ -19,17 +22,37 @@
|
||||||
(set! rewrite-rules
|
(set! rewrite-rules
|
||||||
(cons `(,old unquote new) rewrite-rules)) new)
|
(cons `(,old unquote new) rewrite-rules)) new)
|
||||||
|
|
||||||
;; Guix won't merge my patch for this after 1 grillion years
|
(define-public (specs/pkgs->pkgs pkgs)
|
||||||
(define lua-5.4
|
(map (lambda (x)
|
||||||
(add-rewrite gnu:lua-5.4
|
(if (string? x)
|
||||||
|
(specification->package x) x)) pkgs))
|
||||||
|
|
||||||
|
(define-public (unfuck-packages pkgs)
|
||||||
|
;; kind of a hack but i'm laziggy
|
||||||
|
;; P.S. this too ktoo much work to debug goddamn i shoud ve done somehting less sus amongus
|
||||||
|
(map (lambda (x)
|
||||||
|
(if (string? (car x))
|
||||||
|
(let ((y (cdr x)))
|
||||||
|
(if (pair? (cdr y)) y
|
||||||
|
(car y))) x))
|
||||||
|
(package-inputs ((package-input-rewriting rewrite-rules)
|
||||||
(package
|
(package
|
||||||
(inherit gnu:lua-5.4)
|
(inherit gnu:hello)
|
||||||
(arguments
|
(inputs pkgs))))))
|
||||||
(substitute-keyword-arguments (package-arguments gnu:lua-5.4)
|
|
||||||
((#:make-flags flags)
|
(define-public (unpropagate-inputs pkg)
|
||||||
(append (list-head flags
|
(set! pkg
|
||||||
(- (length flags) 1))
|
(car (specs/pkgs->pkgs `(,pkg))))
|
||||||
'("linux-readline"))))))))
|
(package
|
||||||
|
(inherit pkg)
|
||||||
|
(inputs (append (package-inputs pkg)
|
||||||
|
(package-propagated-inputs pkg)))
|
||||||
|
(propagated-inputs '())))
|
||||||
|
|
||||||
|
|
||||||
|
;;
|
||||||
|
;; packag
|
||||||
|
;;
|
||||||
|
|
||||||
(define (unfuck-ffmpeg ffmpeg)
|
(define (unfuck-ffmpeg ffmpeg)
|
||||||
(add-rewrite ffmpeg
|
(add-rewrite ffmpeg
|
||||||
|
@ -49,30 +72,5 @@
|
||||||
(define ffmpeg
|
(define ffmpeg
|
||||||
(unfuck-ffmpeg gnu:ffmpeg))
|
(unfuck-ffmpeg gnu:ffmpeg))
|
||||||
|
|
||||||
(define-public (unpropagate-inputs pkg)
|
|
||||||
(package
|
|
||||||
(inherit pkg)
|
|
||||||
(inputs (append (package-inputs pkg)
|
|
||||||
(package-propagated-inputs pkg)))
|
|
||||||
(propagated-inputs '())))
|
|
||||||
|
|
||||||
(define-public mpv-noprop-gnu
|
(define-public mpv-noprop-gnu
|
||||||
(unpropagate-inputs gnu:mpv))
|
(unpropagate-inputs gnu:mpv))
|
||||||
|
|
||||||
(define-public (specs/pkgs->pkgs pkgs)
|
|
||||||
(map (lambda (x)
|
|
||||||
(if (string? x)
|
|
||||||
(specification->package x) x)) pkgs))
|
|
||||||
|
|
||||||
(define-public (unfuck-packages pkgs)
|
|
||||||
;; kind of a hack but i'm laziggy
|
|
||||||
;; P.S. this too ktoo much work to debug goddamn i shoud ve done somehting less sus amongus
|
|
||||||
(map (lambda (x)
|
|
||||||
(if (string? (car x))
|
|
||||||
(let ((y (cdr x)))
|
|
||||||
(if (pair? (cdr y)) y
|
|
||||||
(car y))) x))
|
|
||||||
(package-inputs ((package-input-rewriting rewrite-rules)
|
|
||||||
(package
|
|
||||||
(inherit gnu:hello)
|
|
||||||
(inputs pkgs))))))
|
|
||||||
|
|
Loading…
Reference in a new issue