diff options
author | Robert Helgesson <robert@rycee.net> | 2017-07-29 15:04:34 +0200 |
---|---|---|
committer | Robert Helgesson <robert@rycee.net> | 2017-07-29 15:07:19 +0200 |
commit | a444b34b52b13b1658875633f871b96456b1cd71 (patch) | |
tree | 41779f4bbc30085a2d9f6a08f0850784f845653f | |
parent | 16394293592efc71a5dc17f771a4be1ca8910fa5 (diff) |
facedetect: init at 0.1
-rw-r--r-- | pkgs/tools/graphics/facedetect/default.nix | 37 | ||||
-rw-r--r-- | pkgs/top-level/all-packages.nix | 2 |
2 files changed, 39 insertions, 0 deletions
diff --git a/pkgs/tools/graphics/facedetect/default.nix b/pkgs/tools/graphics/facedetect/default.nix new file mode 100644 index 0000000000000..02a3a70fe516f --- /dev/null +++ b/pkgs/tools/graphics/facedetect/default.nix @@ -0,0 +1,37 @@ +{ stdenv, fetchFromGitHub, python2Packages }: + +stdenv.mkDerivation rec { + name = "facedetect-${version}"; + version = "0.1"; + + src = fetchFromGitHub { + owner = "wavexx"; + repo = "facedetect"; + rev = "v${version}"; + sha256 = "0mddh71cjbsngpvjli406ndi2x613y39ydgb8bi4z1jp063865sd"; + }; + + buildInputs = [ python2Packages.python python2Packages.wrapPython ]; + pythonPath = [ python2Packages.numpy python2Packages.opencv ]; + + phases = [ "unpackPhase" "patchPhase" "installPhase" ]; + + patchPhase = '' + substituteInPlace facedetect \ + --replace /usr/share/opencv "${python2Packages.opencv}/share/OpenCV" + ''; + + installPhase = '' + install -v -m644 -D README.rst $out/share/doc/${name}/README.rst + install -v -m755 -D facedetect $out/bin/facedetect + wrapPythonPrograms + ''; + + meta = with stdenv.lib; { + homepage = https://www.thregr.org/~wavexx/software/facedetect/; + description = "A simple face detector for batch processing"; + license = licenses.gpl2Plus; + platforms = platforms.all; + maintainers = [ maintainers.rycee ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index d3c012b37a8f3..2d9dc0b694c80 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -997,6 +997,8 @@ with pkgs; f3 = callPackage ../tools/filesystems/f3 { }; + facedetect = callPackage ../tools/graphics/facedetect { }; + facter = callPackage ../tools/system/facter { boost = boost160; }; |