summary refs log tree commit diff
path: root/pkgs/development/libraries/farbfeld/default.nix
blob: c23fc0bc59f61b5548dcaa0f0a79c8c87d3b330d (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
{ stdenv, fetchgit, makeWrapper, file, libpng, libjpeg }:

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

  src = fetchgit {
    url = "https://git.suckless.org/farbfeld";
    rev = "refs/tags/${version}";
    sha256 = "0pkmkvv5ggpzqwqdchd19442x8gh152xy5z1z13ipfznhspsf870";
  };

  buildInputs = [ libpng libjpeg ];
  nativeBuildInputs = [ makeWrapper ];

  installFlags = "PREFIX=/ DESTDIR=$(out)";
  postInstall = ''
    wrapProgram "$out/bin/2ff" --prefix PATH : "${file}/bin"
  '';

  meta = with stdenv.lib; {
    description = "Suckless image format with conversion tools";
    license = licenses.isc;
    platforms = platforms.linux;
    maintainers = with maintainers; [ pSub ];
  };
}