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