about summary refs log tree commit diff
path: root/nixpkgs/pkgs/applications/office/notes/default.nix
blob: abd93813a725971d7093aeb4e7d9acd2e966add9 (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
{ lib
, stdenv
, fetchFromGitHub
, cmake
, wrapQtAppsHook
, qtbase
, qtdeclarative
, Cocoa
}:

stdenv.mkDerivation (finalAttrs: {
  pname = "notes";
  version = "2.2.1";

  src = fetchFromGitHub {
    owner = "nuttyartist";
    repo = "notes";
    rev = "v${finalAttrs.version}";
    hash = "sha256-ShChF87ysRoisKshY86kJTa3ZAiQhBOImuL8OsEqgBo=";
    fetchSubmodules = true;
  };

  cmakeFlags = [ "-DUPDATE_CHECKER=OFF" ];

  nativeBuildInputs = [
    cmake
    wrapQtAppsHook
  ];

  buildInputs = [
    qtbase
    qtdeclarative
  ] ++ lib.optionals stdenv.isDarwin [
    Cocoa
  ];

  postInstall = lib.optionalString stdenv.isDarwin ''
    mkdir $out/Applications
    mv $out/bin/Notes.app $out/Applications
  '';

  meta = {
    description = "A fast and beautiful note-taking app";
    downloadPage = "https://github.com/nuttyartist/notes";
    homepage = "https://www.get-notes.com";
    license = lib.licenses.mpl20;
    maintainers = with lib.maintainers; [ zendo ];
    platforms = lib.platforms.linux ++ lib.platforms.darwin;
  };
})