Skip to content

Commit a444b34

Browse files
committedJul 29, 2017
facedetect: init at 0.1
1 parent 1639429 commit a444b34

File tree

2 files changed

+39
-0
lines changed

2 files changed

+39
-0
lines changed
 
+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
{ stdenv, fetchFromGitHub, python2Packages }:
2+
3+
stdenv.mkDerivation rec {
4+
name = "facedetect-${version}";
5+
version = "0.1";
6+
7+
src = fetchFromGitHub {
8+
owner = "wavexx";
9+
repo = "facedetect";
10+
rev = "v${version}";
11+
sha256 = "0mddh71cjbsngpvjli406ndi2x613y39ydgb8bi4z1jp063865sd";
12+
};
13+
14+
buildInputs = [ python2Packages.python python2Packages.wrapPython ];
15+
pythonPath = [ python2Packages.numpy python2Packages.opencv ];
16+
17+
phases = [ "unpackPhase" "patchPhase" "installPhase" ];
18+
19+
patchPhase = ''
20+
substituteInPlace facedetect \
21+
--replace /usr/share/opencv "${python2Packages.opencv}/share/OpenCV"
22+
'';
23+
24+
installPhase = ''
25+
install -v -m644 -D README.rst $out/share/doc/${name}/README.rst
26+
install -v -m755 -D facedetect $out/bin/facedetect
27+
wrapPythonPrograms
28+
'';
29+
30+
meta = with stdenv.lib; {
31+
homepage = https://www.thregr.org/~wavexx/software/facedetect/;
32+
description = "A simple face detector for batch processing";
33+
license = licenses.gpl2Plus;
34+
platforms = platforms.all;
35+
maintainers = [ maintainers.rycee ];
36+
};
37+
}

‎pkgs/top-level/all-packages.nix

+2
Original file line numberDiff line numberDiff line change
@@ -997,6 +997,8 @@ with pkgs;
997997

998998
f3 = callPackage ../tools/filesystems/f3 { };
999999

1000+
facedetect = callPackage ../tools/graphics/facedetect { };
1001+
10001002
facter = callPackage ../tools/system/facter {
10011003
boost = boost160;
10021004
};

0 commit comments

Comments
 (0)
Please sign in to comment.