1 { lib, stdenv, fetchFromGitHub, pkg-config, cimg, imagemagick }:
3 stdenv.mkDerivation rec {
7 buildInputs = [ cimg ];
9 # CImg.h calls to external binary `convert` from the `imagemagick` package
11 propagatedBuildInputs = [ imagemagick ];
13 nativeBuildInputs = [ pkg-config ];
15 configureFlags = ["--enable-video-hash=no" "--enable-audio-hash=no"];
17 cp ${cimg}/include/CImg.h $out/include/
20 src = fetchFromGitHub {
24 sha256 = "sha256-frISiZ89ei7XfI5F2nJJehfQZsk0Mlb4n91q/AiZ2vA=";
28 description = "Compute the perceptual hash of an image";
29 license = licenses.gpl3;
30 maintainers = [maintainers.imalsogreg];
31 platforms = platforms.all;
32 homepage = "http://www.phash.org";
33 downloadPage = "https://github.com/clearscene/pHash";