makemkv: Remove hardcodes/hard dependencies

Even without a drive it is useful for working with disc images.
This commit is contained in:
Simon Bruder 2022-05-05 16:29:18 +02:00
parent 8a116ff2ad
commit 4c01701af3
Signed by: simon
GPG key ID: 8D3C82F9F309F8EC

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
'';