summary refs log tree commit diff
path: root/pkgs/applications/office/paper-note/default.nix
blob: e400c88df5dd9c2bd63aa6dd84be97c821720ee1 (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
60
61
62
63
{ lib
, stdenv
, fetchFromGitLab
, meson
, ninja
, pkg-config
, vala
, gtk4
, libgee
, libadwaita
, gtksourceview5
, blueprint-compiler
, wrapGAppsHook4
, appstream-glib
, desktop-file-utils
}:

stdenv.mkDerivation rec {
  pname = "paper-note";
  version = "22.11";

  src = fetchFromGitLab {
    owner = "posidon_software";
    repo = "paper";
    rev = version;
    hash = "sha256-o5MYagflHE8Aup8CbqauRBrdt3TrSlffs35psYT7hyE=";
  };

  nativeBuildInputs = [
    meson
    ninja
    vala
    pkg-config
    wrapGAppsHook4
    appstream-glib
    desktop-file-utils
    blueprint-compiler
  ];

  buildInputs = [
    gtk4
    libadwaita
    libgee
    gtksourceview5
  ];

  postPatch = ''
    substituteInPlace src/meson.build \
      --replace "1.2.0" "${libadwaita.version}"
  '';

  postInstall = ''
    ln -s $out/bin/io.posidon.Paper $out/bin/paper
  '';

  meta = with lib; {
    description = "Take notes in Markdown";
    homepage = "https://posidon.io/paper/";
    license = licenses.gpl3;
    platforms = platforms.unix;
    maintainers = with maintainers; [ j0lol ];
  };
}