diff options
author | Dmitry Kalinkin <dmitry.kalinkin@gmail.com> | 2019-12-26 10:59:18 -0500 |
---|---|---|
committer | Dmitry Kalinkin <dmitry.kalinkin@gmail.com> | 2019-12-26 11:49:12 -0500 |
commit | 0b28198f23fab730a797e865e741d9fd8a50f1a3 (patch) | |
tree | 18e07099a063f4fac023055e00ea61b38ebb1329 /pkgs/applications | |
parent | c5aacb235067a2303afc56b7e214cc4594946ae1 (diff) | |
download | nixpkgs-0b28198f23fab730a797e865e741d9fd8a50f1a3.tar nixpkgs-0b28198f23fab730a797e865e741d9fd8a50f1a3.tar.gz nixpkgs-0b28198f23fab730a797e865e741d9fd8a50f1a3.tar.bz2 nixpkgs-0b28198f23fab730a797e865e741d9fd8a50f1a3.tar.lz nixpkgs-0b28198f23fab730a797e865e741d9fd8a50f1a3.tar.xz nixpkgs-0b28198f23fab730a797e865e741d9fd8a50f1a3.tar.zst nixpkgs-0b28198f23fab730a797e865e741d9fd8a50f1a3.zip |
root: wrap python executables
In normal use of ROOT the PYTHONPATH is intended to be set when user sources the thisroot.{,s}sh. We do that in the setupHook. This covers the case when thisroot.sh was not sourced.
Diffstat (limited to 'pkgs/applications')
-rw-r--r-- | pkgs/applications/science/misc/root/default.nix | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/pkgs/applications/science/misc/root/default.nix b/pkgs/applications/science/misc/root/default.nix index 7a03369febe..b901e40a194 100644 --- a/pkgs/applications/science/misc/root/default.nix +++ b/pkgs/applications/science/misc/root/default.nix @@ -1,5 +1,6 @@ -{ stdenv, fetchurl, cmake, gl2ps, gsl, libX11, libXpm, libXft, libXext -, libGLU, libGL, libxml2, lz4, lzma, pcre, pkgconfig, python, xxHash, zlib +{ stdenv, fetchurl, makeWrapper, cmake, gl2ps, gsl, libX11, libXpm, libXft +, libXext, libGLU, libGL, libxml2, lz4, lzma, pcre, pkgconfig, python, xxHash +, zlib , Cocoa, OpenGL, noSplash ? false }: stdenv.mkDerivation rec { @@ -11,7 +12,7 @@ stdenv.mkDerivation rec { sha256 = "196ghma6g5a7sqz52wyjkgvmh4hj4vqwppm0zwdypy33hgy8anii"; }; - nativeBuildInputs = [ cmake pkgconfig ]; + nativeBuildInputs = [ makeWrapper cmake pkgconfig ]; buildInputs = [ gl2ps pcre python zlib libxml2 lz4 lzma gsl xxHash ] ++ stdenv.lib.optionals (!stdenv.isDarwin) [ libX11 libXpm libXft libXext libGLU libGL ] ++ stdenv.lib.optionals (stdenv.isDarwin) [ Cocoa OpenGL ] @@ -73,6 +74,13 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; + postInstall = '' + for prog in rootbrowse rootcp rooteventselector rootls rootmkdir rootmv rootprint rootrm rootslimtree; do + wrapProgram "$out/bin/$prog" \ + --prefix PYTHONPATH : "$out/lib" + done + ''; + setupHook = ./setup-hook.sh; meta = with stdenv.lib; { |