summary refs log tree commit diff
path: root/pkgs/development/libraries/physics
diff options
context:
space:
mode:
authorDmitry Kalinkin <dmitry.kalinkin@gmail.com>2021-11-11 17:55:53 -0500
committerDmitry Kalinkin <dmitry.kalinkin@gmail.com>2021-11-11 17:55:53 -0500
commit1c6dc994a85365509cd5b7b11894613c65c44ca7 (patch)
treef270bf032b375e11d6de77f3812c533e8ce47ab1 /pkgs/development/libraries/physics
parent7786334d1492221c6ca9eb3c5b53bdc2f0c18e70 (diff)
yoda-with-root: fix sandboxed build
Diffstat (limited to 'pkgs/development/libraries/physics')
-rw-r--r--pkgs/development/libraries/physics/yoda/default.nix11
1 files changed, 10 insertions, 1 deletions
diff --git a/pkgs/development/libraries/physics/yoda/default.nix b/pkgs/development/libraries/physics/yoda/default.nix
index 6fb9b9560aae6..a804766b85dc7 100644
--- a/pkgs/development/libraries/physics/yoda/default.nix
+++ b/pkgs/development/libraries/physics/yoda/default.nix
@@ -1,4 +1,4 @@
-{ lib, stdenv, fetchurl, python, root, makeWrapper, zlib, withRootSupport ? false }:
+{ lib, stdenv, fetchurl, fetchpatch, python, root, makeWrapper, zlib, withRootSupport ? false }:
 
 stdenv.mkDerivation rec {
   pname = "yoda";
@@ -9,6 +9,15 @@ stdenv.mkDerivation rec {
     sha256 = "sha256-xhagWmVlvlsayL0oWTihoxhq0ejejEACCsdQqFN1HUw=";
   };
 
+  patches = [
+    # Prevent ROOT from initializing X11 or Cocoa (helps with sandboxing)
+    (fetchpatch {
+      url = "https://gitlab.com/hepcedar/yoda/-/commit/36c035f4f0385dec58702f09564ca66a14ca2c3e.diff";
+      sha256 = "sha256-afB+y33TVNJtxY5As18EcutJEGDE4g0UzMxzA+YgICk=";
+      excludes = [ "ChangeLog" ];
+    })
+  ];
+
   nativeBuildInputs = with python.pkgs; [ cython makeWrapper ];
   buildInputs = [ python ]
     ++ (with python.pkgs; [ numpy matplotlib ])