summary refs log tree commit diff
path: root/pkgs/development/libraries/farbfeld/default.nix
blob: a528ad6f7f618816cfa0058c69cfe0be76c17b3b (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 {
  pname = "farbfeld";
  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 ];
  };
}