about summary refs log tree commit diff
path: root/pkgs/by-name/sa/satty/package.nix
blob: e358397a48b30b886b452fad300d4ee37238c47d (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
, rustPlatform
, fetchFromGitHub
, pkg-config
, wrapGAppsHook4
, cairo
, gdk-pixbuf
, glib
, gtk4
, libadwaita
, pango
, copyDesktopItems
}:

rustPlatform.buildRustPackage rec {

  pname = "satty";
  version = "0.8.0";

  src = fetchFromGitHub {
    owner = "gabm";
    repo = "Satty";
    rev = "v${version}";
    hash = "sha256-w2kosnPDWUZqp6iyj6ypAGRlmYSby+9B6epsAkFK6eY=";
  };

  cargoHash = "sha256-XeuzoHXSiKtA9ofCBOMHnKKzcmur+/TS96DnzIfpqUA=";

  nativeBuildInputs = [
    copyDesktopItems
    pkg-config
    wrapGAppsHook4
  ];

  buildInputs = [
    cairo
    gdk-pixbuf
    glib
    gtk4
    libadwaita
    pango
  ];

  postInstall = ''
    install -Dt $out/share/icons/hicolor/scalable/apps/ assets/satty.svg
  '';

  desktopItems = [ "satty.desktop" ];

  meta = with lib; {
    description = "A screenshot annotation tool inspired by Swappy and Flameshot";
    homepage = "https://github.com/gabm/Satty";
    license = licenses.mpl20;
    maintainers = with maintainers; [ pinpox ];
    mainProgram = "satty";
    platforms = lib.platforms.linux;
  };
}