makemkv: Remove hardcodes/hard dependencies

Even without a drive it is useful for working with disc images.
pull/64/head
Simon Bruder 2022-05-05 16:29:18 +02:00
parent 8a116ff2ad
commit 4c01701af3
Signed by: simon
GPG Key ID: 8D3C82F9F309F8EC
1 changed files with 5 additions and 4 deletions

View File

@ -3,6 +3,7 @@ let
# TODO: Do not hardcode /dev/{sr0,sg2} (right paths on sayuri)
makemkv-sandbox = pkgs.writeShellScriptBin "makemkv-sandbox" /* bash */ ''
set -euo pipefail
mkdir -p $HOME/.MakeMKV
${pkgs.bubblewrap}/bin/bwrap \
--tmpfs /tmp \
--proc /proc \
@ -17,10 +18,10 @@ let
--ro-bind /run/opengl-driver /run/opengl-driver \
--ro-bind /etc/fonts /etc/fonts \
--new-session \
--bind /home/simon/.MakeMKV /home/simon/.MakeMKV \
--dev-bind /dev/sr0 /dev/sr0 \
--dev-bind /dev/sg2 /dev/sg2 \
--dev-bind /sys/bus/scsi /sys/bus/scsi \
--bind $HOME/.MakeMKV $HOME/.MakeMKV \
--dev-bind-try /dev/sr0 /dev/sr0 \
--dev-bind-try /dev/sg2 /dev/sg2 \
--dev-bind-try /sys/bus/scsi /sys/bus/scsi \
--bind ''${PWD_TARGET:-$PWD} ''${PWD_TARGET:-$PWD} \
${pkgs.unstable.makemkv}/bin/makemkv
'';