fix everything
This commit is contained in:
parent
5137681e08
commit
9264265c7b
|
@ -1,2 +0,0 @@
|
|||
(define-module (guix build-self))
|
||||
; erm.
|
|
@ -2,16 +2,26 @@
|
|||
#:use-module (guix gexp)
|
||||
#:use-module (guix utils)
|
||||
#: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 mpv))
|
||||
#:replace (lua-5.4 ffmpeg-7 ffmpeg))
|
||||
|
||||
(define rewrite-rules
|
||||
'())
|
||||
|
||||
(define (add-rewrite old new)
|
||||
(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
|
||||
|
@ -19,9 +29,10 @@
|
|||
((#:make-flags flags)
|
||||
(append (list-head flags
|
||||
(- (length flags) 1))
|
||||
'("linux-readline")))))))
|
||||
'("linux-readline"))))))))
|
||||
|
||||
(define (unfuck-ffmpeg ffmpeg)
|
||||
(add-rewrite ffmpeg
|
||||
(package
|
||||
(inherit ffmpeg)
|
||||
(arguments
|
||||
|
@ -30,13 +41,38 @@
|
|||
#~(cons* "--enable-libopenmpt"
|
||||
#$flags))))
|
||||
(inputs (modify-inputs (package-inputs ffmpeg)
|
||||
(prepend gnu:libopenmpt)))))
|
||||
(prepend gnu:libopenmpt))))))
|
||||
|
||||
(define ffmpeg-7
|
||||
(unfuck-ffmpeg gnu:ffmpeg-7))
|
||||
|
||||
(define ffmpeg
|
||||
(unfuck-ffmpeg gnu:ffmpeg))
|
||||
|
||||
(define mpv
|
||||
((package-input-rewriting `((,gnu:ffmpeg unquote ffmpeg)))
|
||||
gnu:mpv))
|
||||
(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