Skip to content

Commit

Permalink
flatpak: Fix bubblewrap paths for icon-validator
Browse files Browse the repository at this point in the history
Otherwise, `flatpak-validate-icon --sandbox` gives error:
  bwrap: Can't find source path /etc/ld.so.cache: No such file or directory
  • Loading branch information
mat8913 committed Mar 19, 2019
1 parent e6ccb67 commit f2d6e4a
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
15 changes: 15 additions & 0 deletions pkgs/development/libraries/flatpak/bubblewrap-paths.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
diff --git a/icon-validator/validate-icon.c b/icon-validator/validate-icon.c
index 6e23d9f2..8c621ec4 100644
--- a/icon-validator/validate-icon.c
+++ b/icon-validator/validate-icon.c
@@ -149,8 +149,8 @@ rerun_in_sandbox (const char *arg_width,
"--unshare-ipc",
"--unshare-net",
"--unshare-pid",
- "--ro-bind", "/usr", "/usr",
- "--ro-bind", "/etc/ld.so.cache", "/etc/ld.so.cache",
+ "--ro-bind", "@storeDir@", "@storeDir@",
+ "--ro-bind", "/run/current-system", "/run/current-system",
"--ro-bind", validate_icon, validate_icon,
NULL);

4 changes: 4 additions & 0 deletions pkgs/development/libraries/flatpak/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ stdenv.mkDerivation rec {
src = ./fix-paths.patch;
p11 = p11-kit;
})
(substituteAll {
src = ./bubblewrap-paths.patch;
inherit (builtins) storeDir;
})
# patch taken from gtk_doc
./respect-xml-catalog-files-var.patch
./use-flatpak-from-path.patch
Expand Down

0 comments on commit f2d6e4a

Please sign in to comment.