2
0
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-22 13:43:22 +00:00
nixpkgs/pkgs/development/libraries/phash/default.nix
volth 46420bbaa3 treewide: name -> pname (easy cases) ()
treewide replacement of

stdenv.mkDerivation rec {
  name = "*-${version}";
  version = "*";

to pname
2019-08-15 13:41:18 +01:00

38 lines
977 B
Nix

{ stdenv, fetchFromGitHub, pkgconfig, cimg, imagemagick }:
stdenv.mkDerivation rec {
pname = "pHash";
version = "0.9.4";
buildInputs = [ cimg ];
# CImg.h calls to external binary `convert` from the `imagemagick` package
# at runtime
propagatedBuildInputs = [ imagemagick ];
nativeBuildInputs = [ pkgconfig ];
configureFlags = ["--enable-video-hash=no" "--enable-audio-hash=no"];
postInstall = ''
cp ${cimg}/include/CImg.h $out/include/
'';
src = fetchFromGitHub {
owner = "clearscene";
repo = "pHash";
rev = version;
sha256 = "0y4gknfkns5sssfaj0snyx29752my20xmxajg6xggijx0myabbv0";
};
meta = with stdenv.lib; {
inherit version;
description = "Compute the perceptual hash of an image";
license = licenses.gpl3;
maintainers = [maintainers.imalsogreg];
platforms = platforms.all;
homepage = http://www.phash.org;
downloadPage = "https://github.com/clearscene/pHash";
updateWalker = true;
};
}