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