about summary refs log tree commit diff
path: root/nixpkgs/pkgs/applications/misc/rofi-screenshot/default.nix
blob: fedb03fa613d6d0a0d4cca5a361c69194ad60a99 (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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
{ lib
, stdenv
, fetchFromGitHub
, makeWrapper
, libnotify
, slop
, ffcast
, ffmpeg
, xclip
, rofi
, coreutils
, gnused
, procps
}:

stdenv.mkDerivation rec {
  pname = "rofi-screenshot";
  version = "2023-07-02";

  src = fetchFromGitHub {
    owner = "ceuk";
    repo = pname;
    rev = "365cfa51c6c7deb072d98d7bfd68cf4038bf2737";
    hash = "sha256-M1cab+2pOjZ2dElMg0Y0ZrIxRE0VwymVwcElgzFrmVs=";
  };

  nativeBuildInputs = [ makeWrapper ];

  postFixup = ''
    wrapProgram $out/bin/${pname} \
      --set PATH ${
        lib.makeBinPath [
          libnotify
          slop
          ffcast
          ffmpeg
          xclip
          rofi
          coreutils
          gnused
          procps
        ]
      }
  '';

  installPhase = ''
    install -Dm755 ${pname} $out/bin/${pname}
  '';

  meta = {
    description =
      "Use rofi to perform various types of screenshots and screen captures";
    homepage = "https://github.com/ceuk/rofi-screenshot";
    maintainers = with lib.maintainers; [ zopieux ];
    platforms = lib.platforms.all;
    license = lib.licenses.wtfpl;
  };
}