about summary refs log tree commit diff
path: root/pkgs/applications/office/notes
diff options
context:
space:
mode:
authorzendo <linzway@qq.com>2023-03-28 18:56:06 +0800
committerPol Dellaiera <pol.dellaiera@protonmail.com>2023-07-31 19:57:26 +0200
commit516ca7d8a332ae784d0f4c06d460aa61dd11b463 (patch)
tree48dec75cb8efdccedc027516f719b71ef1490f89 /pkgs/applications/office/notes
parente3eeeecadd5e6ef055a83c5eaed8a660b5b464dd (diff)
notes: init at 2.2.0
Diffstat (limited to 'pkgs/applications/office/notes')
-rw-r--r--pkgs/applications/office/notes/default.nix54
1 files changed, 54 insertions, 0 deletions
diff --git a/pkgs/applications/office/notes/default.nix b/pkgs/applications/office/notes/default.nix
new file mode 100644
index 0000000000000..7ddc7d98dda77
--- /dev/null
+++ b/pkgs/applications/office/notes/default.nix
@@ -0,0 +1,54 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, cmake
+, wrapQtAppsHook
+, qtbase
+, qtdeclarative
+, Cocoa
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "notes";
+  version = "2.2.0";
+
+  src = fetchFromGitHub {
+    owner = "nuttyartist";
+    repo = "notes";
+    rev = "v${finalAttrs.version}";
+    hash = "sha256-ZfAm77UHyjs2aYOYb+AhKViz6uteb7+KKSedonSiMkY=";
+    fetchSubmodules = true;
+  };
+
+  cmakeFlags = [ "-DUPDATE_CHECKER=OFF" ];
+
+  nativeBuildInputs = [
+    cmake
+    wrapQtAppsHook
+  ];
+
+  buildInputs = [
+    qtbase
+    qtdeclarative
+  ] ++ lib.optionals stdenv.isDarwin [
+    Cocoa
+  ];
+
+  postInstall = lib.optionalString stdenv.isLinux ''
+    # temporary fix: https://github.com/nuttyartist/notes/issues/613
+    substituteInPlace $out/share/applications/io.github.nuttyartist.notes.desktop \
+       --replace 'Exec=notes' 'Exec=env QT_STYLE_OVERRIDE= notes'
+  '' + 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;
+  };
+})