at 24.11-pre 1.2 kB view raw
1{ 2 lib, 3 stdenv, 4 fetchFromGitHub, 5 cmake, 6 ninja, 7 python, 8 scikit-build, 9 pytest, 10 numpy, 11}: 12 13stdenv.mkDerivation rec { 14 pname = "segyio"; 15 version = "1.9.12"; 16 17 postPatch = '' 18 # Removing unecessary build dependency 19 substituteInPlace python/setup.py --replace "'pytest-runner'," "" 20 21 # Fixing bug making one test fail in the python 3.10 build 22 substituteInPlace python/segyio/open.py --replace \ 23 "cube_metrics = f.xfd.cube_metrics(iline, xline)" \ 24 "cube_metrics = f.xfd.cube_metrics(int(iline), int(xline))" 25 ''; 26 27 src = fetchFromGitHub { 28 owner = "equinor"; 29 repo = pname; 30 rev = "refs/tags/v${version}"; 31 hash = "sha256-+N2JvHBxpdbysn4noY/9LZ4npoQ9143iFEzaxoafnms="; 32 }; 33 34 nativeBuildInputs = [ 35 cmake 36 ninja 37 python 38 scikit-build 39 ]; 40 41 doCheck = true; 42 # I'm not modifying the checkPhase nor adding a pytestCheckHook because the pytest is called 43 # within the cmake test phase 44 nativeCheckInputs = [ 45 pytest 46 numpy 47 ]; 48 49 meta = with lib; { 50 description = "Fast Python library for SEGY files"; 51 homepage = "https://github.com/equinor/segyio"; 52 license = licenses.lgpl3Only; 53 maintainers = with maintainers; [ atila ]; 54 }; 55}