summaryrefslogtreecommitdiffstats
path: root/pkgs/tools/graphics/blockhash/default.nix
blob: 3ea88053d9e3c53bb5cf717f3af2a3c7f740883e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
{ lib, stdenv, fetchFromGitHub, python, pkgconfig, imagemagick, wafHook }:

stdenv.mkDerivation rec {
  pname = "blockhash";
  version = "0.3.1";

  src = fetchFromGitHub {
    owner = "commonsmachinery";
    repo = "blockhash";
    rev = "v${version}";
    sha256 = "0m7ikppl42iicgmwsb7baajmag7v0p1ab06xckifvrr0zm21bq9p";
  };

  nativeBuildInputs = [ python pkgconfig wafHook ];
  buildInputs = [ imagemagick ];

  meta = with lib; {
    homepage = "http://blockhash.io/";
    description = ''
      This is a perceptual image hash calculation tool based on algorithm
      descibed in Block Mean Value Based Image Perceptual Hashing by Bian Yang,
      Fan Gu and Xiamu Niu.
    '';
    license = licenses.mit;
    maintainers = [ maintainers.infinisil ];
    platforms = platforms.unix;
  };
}