summary refs log tree commit diff
path: root/pkgs/applications/video/giph/default.nix
blob: 431f267e4c87eed48b3f3b5a4720d77d7f216f54 (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
34
35
36
37
38
39
40
41
42
43
{ stdenvNoCC
, lib
, fetchFromGitHub
, ffmpeg
, xdotool
, slop
, libnotify
, procps
, makeWrapper
}:

stdenvNoCC.mkDerivation rec {
  pname = "giph";
  version = "1.1.1";

  src = fetchFromGitHub {
    owner = "phisch";
    repo = pname;
    rev = version;
    sha256 = "19l46m1f32b3bagzrhaqsfnl5n3wbrmg3sdy6fdss4y1yf6nqayk";
  };

  dontConfigure = true;

  dontBuild = true;

  installFlags = [ "PREFIX=${placeholder "out"}" ];

  nativeBuildInputs = [ makeWrapper ];

  postInstall = ''
    wrapProgram $out/bin/giph \
      --prefix PATH : ${lib.makeBinPath [ ffmpeg xdotool libnotify slop procps ]}
  '';

  meta = with lib; {
    homepage = "https://github.com/phisch/giph";
    description = "Simple gif recorder";
    license = licenses.mit;
    maintainers = [ maintainers.legendofmiracles ];
    platforms = platforms.linux;
  };
}