git.iko.soy/typeable/nixpkgs
on master help sign in
flatpak: Fix bubblewrap paths for icon-validator

Otherwise, `flatpak-validate-icon --sandbox` gives error: bwrap: Can't find source path /etc/ld.so.cache: No such file or directory

commitf2d6e4ab04b194002c10dec1342bbde8b46ee840 authorMatthew Harm Bekkema <id@mbekkema.name> dateTue 19 Mar 2019, 15:57 (8 years ago) parente6ccb67
2 files changed+19
pkgs/development/libraries/flatpak/bubblewrap-paths.patch+15 pkgs/development/libraries/flatpak/default.nix+4
pkgs/development/libraries/flatpak/bubblewrap-paths.patchnew file+15
@@ -0,0 +1,15 @@
1+diff --git a/icon-validator/validate-icon.c b/icon-validator/validate-icon.c
2+index 6e23d9f2..8c621ec4 100644
3+--- a/icon-validator/validate-icon.c
4++++ b/icon-validator/validate-icon.c
5+@@ -149,8 +149,8 @@ rerun_in_sandbox (const char *arg_width,
6+ "--unshare-ipc",
7+ "--unshare-net",
8+ "--unshare-pid",
9+- "--ro-bind", "/usr", "/usr",
10+- "--ro-bind", "/etc/ld.so.cache", "/etc/ld.so.cache",
11++ "--ro-bind", "@storeDir@", "@storeDir@",
12++ "--ro-bind", "/run/current-system", "/run/current-system",
13+ "--ro-bind", validate_icon, validate_icon,
14+ NULL);
15+
pkgs/development/libraries/flatpak/default.nix+4
@@ -25,6 +25,10 @@ stdenv.mkDerivation rec {
2525 src = ./fix-paths.patch;
2626 p11 = p11-kit;
2727 })
28+ (substituteAll {
29+ src = ./bubblewrap-paths.patch;
30+ inherit (builtins) storeDir;
31+ })
2832 # patch taken from gtk_doc
2933 ./respect-xml-catalog-files-var.patch
3034 ./use-flatpak-from-path.patch