1diff --git a/dolphin/mat2.desktop b/dolphin/mat2.desktop
2index d365bc5..56313e2 100644
3--- a/dolphin/mat2.desktop
4+++ b/dolphin/mat2.desktop
5@@ -8,6 +8,6 @@ Type=Service
6 Name=Clean metadata
7 Name[de]=Metadaten löschen
8 Name[es]=Limpiar metadatos
9-Icon=/usr/share/icons/hicolor/scalable/apps/mat2.svg
10-Exec=kdialog --yesno "$( mat2 -s %U )" --title "Clean Metadata?" && mat2 %U
11-Exec[de]=kdialog --yesno "$( mat2 -s %U )" --title "Metadaten löschen?" && mat2 %U
12+Icon=@mat2svg@
13+Exec=@kdialog@ --yesno "$( mat2 -s %U )" --title "Clean Metadata?" && mat2 %U
14+Exec[de]=@kdialog@ --yesno "$( mat2 -s %U )" --title "Metadaten löschen?" && mat2 %U
15diff --git a/libmat2/bubblewrap.py b/libmat2/bubblewrap.py
16index 970d5dd..5d3c0b7 100644
17--- a/libmat2/bubblewrap.py
18+++ b/libmat2/bubblewrap.py
19@@ -22,11 +22,7 @@ CalledProcessError = subprocess.CalledProcessError
20
21
22 def _get_bwrap_path() -> str:
23- which_path = shutil.which('bwrap')
24- if which_path:
25- return which_path
26-
27- raise RuntimeError("Unable to find bwrap") # pragma: no cover
28+ return '@bwrap@'
29
30
31 def _get_bwrap_args(tempdir: str,
32@@ -37,16 +33,11 @@ def _get_bwrap_args(tempdir: str,
33
34 # XXX: use --ro-bind-try once all supported platforms
35 # have a bubblewrap recent enough to support it.
36- ro_bind_dirs = ['/usr', '/lib', '/lib64', '/bin', '/sbin', '/etc/alternatives', cwd]
37+ ro_bind_dirs = ['/nix/store', cwd]
38 for bind_dir in ro_bind_dirs:
39 if os.path.isdir(bind_dir): # pragma: no cover
40 ro_bind_args.extend(['--ro-bind', bind_dir, bind_dir])
41
42- ro_bind_files = ['/etc/ld.so.cache']
43- for bind_file in ro_bind_files:
44- if os.path.isfile(bind_file): # pragma: no cover
45- ro_bind_args.extend(['--ro-bind', bind_file, bind_file])
46-
47 args = ro_bind_args + \
48 ['--dev', '/dev',
49 '--proc', '/proc',
50diff --git a/libmat2/exiftool.py b/libmat2/exiftool.py
51index eb65b2a..51a0fa1 100644
52--- a/libmat2/exiftool.py
53+++ b/libmat2/exiftool.py
54@@ -1,8 +1,6 @@
55-import functools
56 import json
57 import logging
58 import os
59-import shutil
60 import subprocess
61 from typing import Dict, Union, Set
62
63@@ -70,14 +68,5 @@ class ExiftoolParser(abstract.AbstractParser):
64 return False
65 return True
66
67-@functools.lru_cache()
68 def _get_exiftool_path() -> str: # pragma: no cover
69- which_path = shutil.which('exiftool')
70- if which_path:
71- return which_path
72-
73- # Exiftool on Arch Linux has a weird path
74- if os.access('/usr/bin/vendor_perl/exiftool', os.X_OK):
75- return '/usr/bin/vendor_perl/exiftool'
76-
77- raise RuntimeError("Unable to find exiftool")
78+ return '@exiftool@'
79diff --git a/libmat2/parser_factory.py b/libmat2/parser_factory.py
80index 9965432..bd45179 100644
81--- a/libmat2/parser_factory.py
82+++ b/libmat2/parser_factory.py
83@@ -8,6 +8,7 @@ from . import abstract, UNSUPPORTED_EXTENSIONS
84
85 T = TypeVar('T', bound='abstract.AbstractParser')
86
87+mimetypes.init(['@mimetypes@'])
88 mimetypes.add_type('application/epub+zip', '.epub')
89 mimetypes.add_type('application/x-dtbncx+xml', '.ncx') # EPUB Navigation Control XML File
90
91diff --git a/libmat2/video.py b/libmat2/video.py
92index b4a3232..3dd7ee5 100644
93--- a/libmat2/video.py
94+++ b/libmat2/video.py
95@@ -1,6 +1,4 @@
96 import subprocess
97-import functools
98-import shutil
99 import logging
100
101 from typing import Dict, Union
102@@ -135,10 +133,5 @@ class MP4Parser(AbstractFFmpegParser):
103 }
104
105
106-@functools.lru_cache()
107 def _get_ffmpeg_path() -> str: # pragma: no cover
108- which_path = shutil.which('ffmpeg')
109- if which_path:
110- return which_path
111-
112- raise RuntimeError("Unable to find ffmpeg")
113+ return '@ffmpeg@'