lol
at 24.11-pre 68 lines 1.4 kB view raw
1{ lib 2, stdenv 3, fetchurl 4, python 5, root 6, makeWrapper 7, zlib 8, withRootSupport ? false 9}: 10 11stdenv.mkDerivation rec { 12 pname = "yoda"; 13 version = "1.9.10"; 14 15 src = fetchurl { 16 url = "https://www.hepforge.org/archive/yoda/YODA-${version}.tar.bz2"; 17 hash = "sha256-CnCO6dcElF0zh8xDexX/3fOCxw/lurOe0r2/g8LCjG8="; 18 }; 19 20 nativeBuildInputs = with python.pkgs; [ 21 cython 22 makeWrapper 23 ]; 24 25 buildInputs = [ 26 python 27 ] ++ (with python.pkgs; [ 28 numpy 29 matplotlib 30 ]) ++ lib.optionals withRootSupport [ 31 root 32 ]; 33 34 propagatedBuildInputs = [ 35 zlib 36 ]; 37 38 enableParallelBuilding = true; 39 40 postPatch = '' 41 touch pyext/yoda/*.{pyx,pxd} 42 patchShebangs . 43 44 substituteInPlace pyext/yoda/plotting/script_generator.py \ 45 --replace '/usr/bin/env python' '${python.interpreter}' 46 ''; 47 48 postInstall = '' 49 for prog in "$out"/bin/*; do 50 wrapProgram "$prog" --set PYTHONPATH $PYTHONPATH:$(toPythonPath "$out") 51 done 52 ''; 53 54 hardeningDisable = [ "format" ]; 55 56 doInstallCheck = true; 57 58 installCheckTarget = "check"; 59 60 meta = with lib; { 61 description = "Provides small set of data analysis (specifically histogramming) classes"; 62 license = licenses.gpl3Only; 63 homepage = "https://yoda.hepforge.org"; 64 changelog = "https://gitlab.com/hepcedar/yoda/-/blob/yoda-${version}/ChangeLog"; 65 platforms = platforms.unix; 66 maintainers = with maintainers; [ veprbl ]; 67 }; 68}