about summary refs log tree commit diff
path: root/pkgs/tools/graphics
diff options
context:
space:
mode:
authorVladimír Čunát <vcunat@gmail.com>2018-05-20 13:20:53 +0200
committerVladimír Čunát <vcunat@gmail.com>2018-05-20 13:20:53 +0200
commit392e6de7d0cc9a65a7fd195fd1304310a30a8489 (patch)
treefefd8ca07d3e2665a4746ac0fd43d0c7965d660e /pkgs/tools/graphics
parent90c01001396e166fabfbcfb955de2a5409a95d9b (diff)
parent68cdc9c09e38e704a3bed720fc182f1907035375 (diff)
downloadnixlib-392e6de7d0cc9a65a7fd195fd1304310a30a8489.tar
nixlib-392e6de7d0cc9a65a7fd195fd1304310a30a8489.tar.gz
nixlib-392e6de7d0cc9a65a7fd195fd1304310a30a8489.tar.bz2
nixlib-392e6de7d0cc9a65a7fd195fd1304310a30a8489.tar.lz
nixlib-392e6de7d0cc9a65a7fd195fd1304310a30a8489.tar.xz
nixlib-392e6de7d0cc9a65a7fd195fd1304310a30a8489.tar.zst
nixlib-392e6de7d0cc9a65a7fd195fd1304310a30a8489.zip
Merge branch 'master' into staging
Diffstat (limited to 'pkgs/tools/graphics')
-rw-r--r--pkgs/tools/graphics/blockhash/default.nix32
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;
+  };
+}