diff options
author | Greg Hale <ImAlsoGreg@gmail.com> | 2018-06-27 16:22:52 -0400 |
---|---|---|
committer | xeji <36407913+xeji@users.noreply.github.com> | 2018-06-27 22:22:52 +0200 |
commit | 98c1ad879a34954944972ac7465343d325f7156b (patch) | |
tree | c840b7b645511f8ed78041e812b37217249e7183 | |
parent | fce8f26af6ef8209c7d282938e9457438746841b (diff) | |
download | nixpkgs-98c1ad879a34954944972ac7465343d325f7156b.tar nixpkgs-98c1ad879a34954944972ac7465343d325f7156b.tar.gz nixpkgs-98c1ad879a34954944972ac7465343d325f7156b.tar.bz2 nixpkgs-98c1ad879a34954944972ac7465343d325f7156b.tar.lz nixpkgs-98c1ad879a34954944972ac7465343d325f7156b.tar.xz nixpkgs-98c1ad879a34954944972ac7465343d325f7156b.tar.zst nixpkgs-98c1ad879a34954944972ac7465343d325f7156b.zip |
pHash: init at 0.9.4 (#42546)
Fix style and redundancy issues pointed out by @jb55
-rw-r--r-- | maintainers/maintainer-list.nix | 5 | ||||
-rw-r--r-- | pkgs/development/libraries/phash/default.nix | 38 | ||||
-rw-r--r-- | pkgs/top-level/all-packages.nix | 2 |
3 files changed, 45 insertions, 0 deletions
diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index 5d485bbee47..91df639ee85 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -1722,6 +1722,11 @@ github = "IvanMalison"; name = "Ivan Malison"; }; + imalsogreg = { + email = "imalsogreg@gmail.com"; + github = "imalsogreg"; + name = "Greg Hale"; + }; infinisil = { email = "infinisil@icloud.com"; github = "infinisil"; diff --git a/pkgs/development/libraries/phash/default.nix b/pkgs/development/libraries/phash/default.nix new file mode 100644 index 00000000000..4cc607345e8 --- /dev/null +++ b/pkgs/development/libraries/phash/default.nix @@ -0,0 +1,38 @@ +{ stdenv, fetchFromGitHub, pkgconfig, cimg, imagemagick }: + +stdenv.mkDerivation rec { + name = "${pname}-${version}"; + 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; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 507f3ee5d84..4202685e491 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -4078,6 +4078,8 @@ with pkgs; pasystray = callPackage ../tools/audio/pasystray { }; + phash = callPackage ../development/libraries/phash { }; + pnmixer = callPackage ../tools/audio/pnmixer { }; pulsemixer = callPackage ../tools/audio/pulsemixer { }; |