nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 rustPlatform,
4 fetchFromGitHub,
5 pkg-config,
6 wrapGAppsHook4,
7 gdk-pixbuf,
8 glib,
9 gtk4,
10 libadwaita,
11 libepoxy,
12 libGL,
13 copyDesktopItems,
14 installShellFiles,
15}:
16
17rustPlatform.buildRustPackage rec {
18
19 pname = "satty";
20 version = "0.19.0";
21
22 src = fetchFromGitHub {
23 owner = "gabm";
24 repo = "Satty";
25 rev = "v${version}";
26 hash = "sha256-AKzTDBKqZuZfEgPJqv8I5IuCeDkD2+fBY44aAPFaYvI=";
27 };
28
29 cargoHash = "sha256-hvJOjWD5TRXlDr5KfpFlzAi44Xd6VuaFexXziXgDLCk=";
30
31 nativeBuildInputs = [
32 copyDesktopItems
33 pkg-config
34 wrapGAppsHook4
35 installShellFiles
36 ];
37
38 buildInputs = [
39 gdk-pixbuf
40 glib
41 gtk4
42 libadwaita
43 libepoxy
44 libGL
45 ];
46
47 postInstall = ''
48 install -Dt $out/share/icons/hicolor/scalable/apps/ assets/satty.svg
49
50 installShellCompletion --cmd satty \
51 --bash completions/satty.bash \
52 --fish completions/satty.fish \
53 --zsh completions/_satty
54 '';
55
56 desktopItems = [ "satty.desktop" ];
57
58 meta = with lib; {
59 description = "Screenshot annotation tool inspired by Swappy and Flameshot";
60 homepage = "https://github.com/gabm/Satty";
61 license = licenses.mpl20;
62 maintainers = with maintainers; [
63 pinpox
64 donovanglover
65 ];
66 mainProgram = "satty";
67 platforms = lib.platforms.linux;
68 };
69}