Primarily, familiarity with C++ is a, well, plus.

I was trying to get this to work so we could have MakeMKV (https://makemkv.com/) but I've hit a bug and can't figure it out for the life of me; so I'm just throwing this out here on the off-chance anyone besides me can figure it out.

I was able to get installation of both necessary bits to work; the open-source parts can be installed with:

(use-modules ((guix licenses) #:prefix license:) (guix utils) (guix packages) (guix download) (guix build-system gnu) (gnu packages pkg-config) (gnu packages compression) (gnu packages tls) (gnu packages xml) (gnu packages video) (gnu packages qt)) (package (name "makemkv-oss") (version "1.16.5") (source (origin (method url-fetch) (uri (string-append "https://www.makemkv.com/download/" name "-" version ".tar.gz")) (sha256 (base32 "131vdi4gyc996z77rrcqb9nfbd62j8314ai4ib1jnilmrsrk93p5")))) (build-system gnu-build-system) (arguments '(#:tests? #f #:phases (modify-phases tandard-phases (add-before 'configure 'set-ldconfig-cache (lambda _ (substitute* "Makefile.in" [("ldconfig") "ldconfig -C /tmp/ld.so.cache~"])))))) (native-inputs (list pkg-config)) (inputs (list zlib openssl expat ffmpeg qtbase-5)) (home-page "https://www.makemkv.com/") (synopsis "Helper files for MakeMKV") (description "MakeMKV allows for creating MKV files from the chapters of a DVD. This package provides the MakeMKV GUI, libmakemkv multiplexer library, and libdriveio MMC drive interrogation library") (license license:lgpl2.1)) 

and the binary; I wound up adding the above package to a repo. so I could make it an input of the binary package so I could patchelf the binary to use the above package:

(use-modules ((guix licenses) #:prefix license:) (guix utils) (guix packages) (guix download) (guix build-system gnu) (gnu packages bootstrap) (gnu packages elf) (your-library makemkv-oss)) (package (name "makemkvcon") (version "1.16.5") (source (origin (method url-fetch) (uri (string-append "https://www.makemkv.com/download/" "makemkv-bin-" version ".tar.gz")) (sha256 (base32 "1y14yxhjj0sdq0s24qr58m0ddhna2rf0q0w3ny888as4wbqiwvm0")))) (build-system gnu-build-system) (arguments `(#:modules ((guix build gnu-build-system) (guix build utils) (ice-9 popen) (ice-9 rdelim)) #:tests? #f #:phases (modify-phases tandard-phases (delete 'configure) (delete 'build) (add-before 'install 'remove-eula (lambda* (#:key outputs #:allow-other-keys) (let ([out (assoc-ref outputs "out")]) (substitute* "Makefile" [("PREFIX=/usr") (string-append "PREFIX=" out)] [("install: tmp/eula_accepted bin/") "install: bin/"])))) (add-after 'install 'fix-rpath (lambda* (#:key inputs outputs #:allow-other-keys) (let ([makemkvcon-bin (string-append (assoc-ref outputs "out") "/bin/makemkvcon")]) (invoke "patchelf" "--set-interpreter" (search-input-file inputs ,(glibc-dynamic-linker)) makemkvcon-bin) (invoke "patchelf" "--set-rpath" (string-append (assoc-ref inputs "makemkv-oss") "/lib") makemkvcon-bin)))) (delete 'strip)))) (native-inputs (list patchelf)) (propagated-inputs (list makemkv-oss)) (home-page "https://www.makemkv.com/") (synopsis "Executable for MakeMKV to handle disc operations") (description "") (license license:non-copyleft)) 

And, honestly, I was able to install both of these without any hiccup.

makemkvcon even, as far as I can tell, works perfectly.

But, when I try to launch MakeMKV, I get hit with a notification that the program throws the error CANT_LOCATE_MAKEMKVCON.

I tried scouring the open-source bits (as that's where the GUI resides) to figure out why that error might be thrown and, in spite of thinking I found the cause a few times, came up empty; it's not in the first package defintion I have here but, in makemkvgui/src/api_linux.cpp, there's an array const with bin locations and I tried updating that with /run/current-system/profile/bin and my home .guix-profile/bin but still wasn't able to get any different behavior. I also don't really know C++ so maybe I'm missing something obvious.

I'm at a deadend so just throwing this out here so it doesn't have to just end with me taking a look at it. The binary package would certainly have to go in nongnu but, the more packages we have available for use in Guix, the better for all Guix users, I figure.

submitted by /u/blah1998z
[link] [comments]