1{ lib, stdenv, fetchFromGitHub, python3, pkg-config, imagemagick, wafHook }:
2
3stdenv.mkDerivation rec {
4 pname = "blockhash";
5 version = "0.3.3";
6
7 src = fetchFromGitHub {
8 owner = "commonsmachinery";
9 repo = "blockhash";
10 rev = "v${version}";
11 sha256 = "sha256-QoqFTCfWtXIrFF3Yx4NfOa9cSjHtCSKz3k3i0u9Qx9M=";
12 };
13
14 nativeBuildInputs = [ python3 pkg-config wafHook ];
15 buildInputs = [ imagemagick ];
16
17 strictDeps = true;
18
19 meta = with lib; {
20 homepage = "https://github.com/commonsmachinery/blockhash";
21 description = ''
22 This is a perceptual image hash calculation tool based on algorithm
23 descibed in Block Mean Value Based Image Perceptual Hashing by Bian Yang,
24 Fan Gu and Xiamu Niu.
25 '';
26 license = licenses.mit;
27 maintainers = [ maintainers.infinisil ];
28 platforms = platforms.unix;
29 };
30}