summary refs log tree commit diff
path: root/pkgs/tools/graphics/metapixel/default.nix
blob: 8c9fef0cd484d1ff338cfece2f00c318436a7295 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
{ lib, stdenv, fetchFromGitHub, libpng, libjpeg, giflib, perl, pkg-config }:

stdenv.mkDerivation rec {
  pname = "metapixel";
  version = "1.0.2";

  src = fetchFromGitHub {
    owner = "schani";
    repo = pname;
    rev = "98ee9daa093b6c334941242e63f90b1c2876eb4f";
    fetchSubmodules = true;
    sha256 = "0r7n3a6bvcxkbpda4mwmrpicii09iql5z69nkjqygkwxw7ny3309";
  };

  makeFlags = [ "metapixel" ];

  nativeBuildInputs = [ pkg-config ];
  buildInputs = [ libpng libjpeg giflib perl ];

  installPhase = ''
    mkdir -p $out/bin
    cp metapixel $out/bin/metapixel
    cp metapixel-prepare $out/bin/metapixel-prepare
    cp metapixel-sizesort $out/bin/metapixel-sizesort
  '';

  meta = with lib; {
    homepage = "https://github.com/schani/metapixel";
    description = "Tool for generating photomosaics";
    license = licenses.gpl2Only;
    maintainers = with maintainers; [ dandellion ];
  };
}