Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib 2, buildPythonPackage 3, fetchFromGitHub 4, pythonOlder 5, pytestCheckHook 6, pythonRelaxDepsHook 7, poetry-core 8, jsonschema 9, numpy 10, pydicom 11, simpleitk 12}: 13 14buildPythonPackage rec { 15 pname = "pydicom-seg"; 16 version = "0.4.1"; 17 format = "pyproject"; 18 19 disabled = pythonOlder "3.7"; 20 21 src = fetchFromGitHub { 22 owner = "razorx89"; 23 repo = pname; 24 rev = "refs/tags/v${version}"; 25 hash = "sha256-2Y3fZHKfZqdp5EU8HfVsmJ5JFfVGZuAR7+Kj7qaTiPM="; 26 fetchSubmodules = true; 27 }; 28 29 postPatch = '' 30 substituteInPlace pyproject.toml \ 31 --replace "poetry.masonry.api" "poetry.core.masonry.api" 32 ''; 33 34 pythonRelaxDeps = [ 35 "jsonschema" 36 ]; 37 38 nativeBuildInputs = [ 39 poetry-core 40 pythonRelaxDepsHook 41 ]; 42 43 propagatedBuildInputs = [ 44 jsonschema 45 numpy 46 pydicom 47 simpleitk 48 ]; 49 50 nativeCheckInputs = [ 51 pytestCheckHook 52 ]; 53 54 pythonImportsCheck = [ 55 "pydicom_seg" 56 ]; 57 58 meta = with lib; { 59 description = "Medical segmentation file reading and writing"; 60 homepage = "https://github.com/razorx89/pydicom-seg"; 61 changelog = "https://github.com/razorx89/pydicom-seg/releases/tag/v${version}"; 62 license = licenses.mit; 63 maintainers = with maintainers; [ bcdarwin ]; 64 }; 65}