at 23.05-pre 1.3 kB view raw
1{ lib 2, buildPythonPackage 3, fetchPypi 4, fetchFromGitHub 5, fetchurl 6, writeText 7, blender 8, minexr 9, beautifulsoup4 10, zcs 11, requests 12, opencv3 13, boxx 14}: 15 16buildPythonPackage rec { 17 pname = "bpycv"; 18 version = "0.2.43"; 19 20 src = fetchPypi { 21 inherit pname version; 22 sha256 = "sha256-6LXhKuNkX3yKeZARLXmOVNAUQhJghtzKhnszJ1G/a8U="; 23 }; 24 25 propagatedBuildInputs = [ 26 beautifulsoup4 27 minexr 28 zcs 29 requests 30 opencv3 31 boxx 32 ]; 33 34 postPatch = '' 35 sed -i 's/opencv-python//g' requirements.txt 36 ''; 37 38 # pythonImportsCheck = [ "bpycv" ]; # this import depends on bpy that is only available inside blender 39 checkInputs = [ blender ]; 40 checkPhase = let 41 bpycv_example_data = fetchFromGitHub { 42 owner = "DIYer22"; 43 repo = "bpycv_example_data"; 44 sha256 = "sha256-dGb6KvbXTGTu5f4AqhA+i4AwTqBoR5SdXk0vsMEcD3Q="; 45 rev = "6ce0e65c107d572011394da16ffdf851e988dbb4"; 46 }; 47 in '' 48 TEMPDIR=$(mktemp -d) 49 pushd $TEMPDIR 50 cp -r ${bpycv_example_data} example_data 51 chmod +w -R example_data 52 BPY_EXAMPLE_DATA=${bpycv_example_data} blender -b -P ${./bpycv-test.py} 53 popd 54 ''; 55 56 meta = with lib; { 57 description = "Computer vision utils for Blender"; 58 homepage = "https://github.com/DIYer22/bpycv"; 59 license = licenses.mit; 60 maintainers = with maintainers; [ lucasew ]; 61 }; 62}