summary refs log tree commit diff
path: root/pkgs/development/tools/ocaml/opam/opam-pull-3487.patch
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/tools/ocaml/opam/opam-pull-3487.patch')
-rw-r--r--pkgs/development/tools/ocaml/opam/opam-pull-3487.patch23
1 files changed, 23 insertions, 0 deletions
diff --git a/pkgs/development/tools/ocaml/opam/opam-pull-3487.patch b/pkgs/development/tools/ocaml/opam/opam-pull-3487.patch
new file mode 100644
index 000000000000..e047c8298bc3
--- /dev/null
+++ b/pkgs/development/tools/ocaml/opam/opam-pull-3487.patch
@@ -0,0 +1,23 @@
+diff --git a/src/state/shellscripts/bwrap.sh b/src/state/shellscripts/bwrap.sh
+index 6f5d7dbea..3e1a3e1b4 100755
+--- a/src/state/shellscripts/bwrap.sh
++++ b/src/state/shellscripts/bwrap.sh
+@@ -1,4 +1,6 @@
+-#!/bin/bash -ue
++#!/usr/bin/env bash
++
++set -ue
+ 
+ if ! command -v bwrap >/dev/null; then
+     echo "The 'bwrap' command was not found. Install 'bubblewrap' on your system, or" >&2
+@@ -11,7 +13,9 @@ fi
+ 
+ ARGS=(--unshare-net --new-session)
+ ARGS=("${ARGS[@]}" --proc /proc --dev /dev)
+-ARGS=("${ARGS[@]}" --bind /tmp /tmp --tmpfs /run --tmpfs /var)
++ARGS=("${ARGS[@]}" --bind "${TMPDIR:-/tmp}" /tmp)
++ARGS=("${ARGS[@]}" --setenv TMPDIR /tmp --setenv TMP /tmp --setenv TEMPDIR /tmp --setenv TEMP /tmp)
++ARGS=("${ARGS[@]}" --tmpfs /run --tmpfs /var)
+ 
+ add_mounts() {
+     case "$1" in