about summary refs log tree commit diff
path: root/pkgs/applications/graphics/pizarra/default.nix
blob: 6fd94f57e1e75a1d1346f202a4ca1ba2a2b4177e (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
59
{ lib
, fetchFromGitLab
, rustPlatform
, cargo
, pkg-config
, binutils-unwrapped
, gtk3-x11
, atk
, glib
, librsvg
, gdk-pixbuf
, wrapGAppsHook3
}:

rustPlatform.buildRustPackage rec {
  pname = "pizarra";
  version = "1.7.5";

  src = fetchFromGitLab {
    owner = "categulario";
    repo = "pizarra-gtk";
    rev = "v${version}";
    fetchSubmodules = true;
    sha256 = "sha256-vnjhveX3EVIfJLiHWhlvhoPcRx1a8Nnjj7hIaPgU3Zw=";
  };

  cargoHash = "sha256-btvMUKADGHlXLmeKF1K9Js44SljZ0MejGId8aDwPhVU=";

  nativeBuildInputs = [ wrapGAppsHook3 pkg-config gdk-pixbuf ];

  buildInputs = [ gtk3-x11 atk glib librsvg ];

  postInstall = ''
    install -Dm444 res/icons/tk.categulario.pizarra.svg $out/share/icons/hicolor/scalable/apps/pizarra.svg
    install -Dm444 res/pizarra.desktop -t $out/share/applications
    substituteInPlace $out/share/applications/pizarra.desktop \
      --replace "TryExec=/usr/bin/" "TryExec=" \
      --replace "Exec=/usr/bin/" "Exec=" \
      --replace "Icon=/usr/share/icons/hicolor/scalable/apps/pizarra.svg" "Icon=pizarra"
  '';

  meta = with lib; {
    description = "A simple blackboard written in GTK";
    mainProgram = "pizarra";
    longDescription = ''
      A simple endless blackboard.
      Contains various features, such as:
      - Pencil
      - Rectangle
      - Ellipse
      - Line
      - Text
      - Grids
    '';
    homepage = "https://pizarra.categulario.xyz/en/";
    license = licenses.gpl3Plus;
    maintainers = with maintainers; [ mglolenstine ];
  };
}