diff options
Diffstat (limited to 'pkgs/tools/graphics/blockhash/default.nix')
-rw-r--r-- | pkgs/tools/graphics/blockhash/default.nix | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/pkgs/tools/graphics/blockhash/default.nix b/pkgs/tools/graphics/blockhash/default.nix new file mode 100644 index 000000000000..c48b85cedb26 --- /dev/null +++ b/pkgs/tools/graphics/blockhash/default.nix @@ -0,0 +1,32 @@ +{ stdenv, fetchFromGitHub, python, pkgconfig, imagemagick }: + +stdenv.mkDerivation rec { + name = "blockhash-${version}"; + version = "0.3"; + + src = fetchFromGitHub { + owner = "commonsmachinery"; + repo = "blockhash"; + rev = "v${version}"; + sha256 = "15iwljpkykn2711jhls7cwkb23gk6iawlvvk4prl972wic2wlxcj"; + }; + + nativeBuildInputs = [ python pkgconfig ]; + buildInputs = [ imagemagick ]; + + configurePhase = "python waf configure --prefix=$out"; + buildPhase = "python waf"; + installPhase = "python waf install"; + + meta = with stdenv.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; + }; +} |