|
|
|
@ -1,4 +1,4 @@ |
|
|
|
|
{ lib, stdenv, fetchFromGitHub, python2Packages }: |
|
|
|
|
{ lib, stdenv, fetchFromGitHub, fetchpatch, python3Packages }: |
|
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec { |
|
|
|
|
pname = "facedetect"; |
|
|
|
@ -11,14 +11,22 @@ stdenv.mkDerivation rec { |
|
|
|
|
sha256 = "0mddh71cjbsngpvjli406ndi2x613y39ydgb8bi4z1jp063865sd"; |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
buildInputs = [ python2Packages.python python2Packages.wrapPython ]; |
|
|
|
|
pythonPath = [ python2Packages.numpy python2Packages.opencv4 ]; |
|
|
|
|
patches = [ |
|
|
|
|
(fetchpatch { |
|
|
|
|
name = "python3-support.patch"; |
|
|
|
|
url = "https://gitlab.com/wavexx/facedetect/-/commit/8037d4406eb76dd5c106819f72c3562f8b255b5b.patch"; |
|
|
|
|
sha256 = "1752k37pbkigiwglx99ba9360ahzzrrb65a8d77k3xs4c3bcmk2p"; |
|
|
|
|
}) |
|
|
|
|
]; |
|
|
|
|
|
|
|
|
|
buildInputs = [ python3Packages.python python3Packages.wrapPython ]; |
|
|
|
|
pythonPath = [ python3Packages.numpy python3Packages.opencv4 ]; |
|
|
|
|
|
|
|
|
|
dontConfigure = true; |
|
|
|
|
|
|
|
|
|
patchPhase = '' |
|
|
|
|
postPatch = '' |
|
|
|
|
substituteInPlace facedetect \ |
|
|
|
|
--replace /usr/share/opencv "${python2Packages.opencv4}/share/opencv4" |
|
|
|
|
--replace /usr/share/opencv "${python3Packages.opencv4}/share/opencv4" |
|
|
|
|
''; |
|
|
|
|
|
|
|
|
|
installPhase = '' |
|
|
|
|