parent
9264265c7b
commit
b008d601ce
|
@ -4,13 +4,16 @@
|
|||
#:use-module (guix packages)
|
||||
#:use-module ((gnu packages base)
|
||||
#:prefix gnu:)
|
||||
#:use-module ((gnu packages lua)
|
||||
#:prefix gnu:)
|
||||
#:use-module ((gnu packages video)
|
||||
#:prefix gnu:)
|
||||
#:use-module ((gnu packages audio)
|
||||
#:prefix gnu:)
|
||||
#:replace (lua-5.4 ffmpeg-7 ffmpeg))
|
||||
#:replace (ffmpeg-7 ffmpeg))
|
||||
|
||||
|
||||
;;
|
||||
;; Utils
|
||||
;;
|
||||
|
||||
(define rewrite-rules
|
||||
'())
|
||||
|
@ -19,17 +22,37 @@
|
|||
(set! rewrite-rules
|
||||
(cons `(,old unquote new) rewrite-rules)) new)
|
||||
|
||||
;; Guix won't merge my patch for this after 1 grillion years
|
||||
(define lua-5.4
|
||||
(add-rewrite gnu:lua-5.4
|
||||
(package
|
||||
(inherit gnu:lua-5.4)
|
||||
(arguments
|
||||
(substitute-keyword-arguments (package-arguments gnu:lua-5.4)
|
||||
((#:make-flags flags)
|
||||
(append (list-head flags
|
||||
(- (length flags) 1))
|
||||
'("linux-readline"))))))))
|
||||
(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))))))
|
||||
|
||||
(define-public (unpropagate-inputs pkg)
|
||||
(set! pkg
|
||||
(car (specs/pkgs->pkgs `(,pkg))))
|
||||
(package
|
||||
(inherit pkg)
|
||||
(inputs (append (package-inputs pkg)
|
||||
(package-propagated-inputs pkg)))
|
||||
(propagated-inputs '())))
|
||||
|
||||
|
||||
;;
|
||||
;; packag
|
||||
;;
|
||||
|
||||
(define (unfuck-ffmpeg ffmpeg)
|
||||
(add-rewrite ffmpeg
|
||||
|
@ -49,30 +72,5 @@
|
|||
(define 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
|
||||
(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