diff --git a/pkgs/development/libraries/physics/yoda/default.nix b/pkgs/development/libraries/physics/yoda/default.nix index 6fb9b9560aae..a804766b85dc 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 ])