From 9a2a3c16c8345bca369a57efb0da4bc45c178f56 Mon Sep 17 00:00:00 2001 From: parth Date: Fri, 13 Dec 2024 18:57:32 -0500 Subject: [PATCH] lockbook-desktop: init at 0.9.15 --- pkgs/by-name/lo/lockbook-desktop/package.nix | 90 ++++++++++++++++++++ 1 file changed, 90 insertions(+) create mode 100644 pkgs/by-name/lo/lockbook-desktop/package.nix diff --git a/pkgs/by-name/lo/lockbook-desktop/package.nix b/pkgs/by-name/lo/lockbook-desktop/package.nix new file mode 100644 index 0000000000000..3b534b26453f3 --- /dev/null +++ b/pkgs/by-name/lo/lockbook-desktop/package.nix @@ -0,0 +1,90 @@ +{ + lib, + rustPlatform, + fetchFromGitHub, + pkg-config, + gtk3, + glib, + gobject-introspection, + gdk-pixbuf, + libxkbcommon, + vulkan-loader, + makeDesktopItem, + autoPatchelfHook, + copyDesktopItems, +}: +let + desc = "Private, polished note-taking platform"; +in +rustPlatform.buildRustPackage rec { + pname = "lockbook-desktop"; + version = "0.9.15"; + + src = fetchFromGitHub { + owner = "lockbook"; + repo = "lockbook"; + tag = version; + hash = "sha256-hqBjA/6MWlhVjV4m+cIcnoRTApHuzbPzivMsaQHfRcc="; + }; + + useFetchCargoVendor = true; + cargoHash = "sha256-+M+wL26KDbLKhcujPyWAsTlXwLrQVCUbTnnu/7sXul4="; + + nativeBuildInputs = [ + pkg-config + autoPatchelfHook + copyDesktopItems + ]; + + buildInputs = [ + gtk3 + glib + gobject-introspection + gdk-pixbuf + libxkbcommon + ]; + + runtimeDependencies = [ + vulkan-loader + ]; + + doCheck = false; # there are no cli tests + cargoBuildFlags = [ + "--package" + "lockbook-linux" + ]; + + desktopItems = makeDesktopItem { + desktopName = "Lockbook"; + name = "lockbook-desktop"; + comment = desc; + icon = "lockbook"; + exec = "lockbook-desktop"; + categories = [ + "Office" + "Documentation" + "Utility" + ]; + }; + + postInstall = '' + mv $out/bin/lockbook-linux $out/bin/lockbook-desktop + install -D public_site/favicon.svg $out/share/icons/hicolor/scalable/apps/lockbook.svg + ''; + + meta = { + description = desc; + longDescription = '' + Write notes, sketch ideas, and store files in one secure place. + Share seamlessly, keep data synced, and access it on any + platform—even offline. Lockbook encrypts files so even we + can’t see them, but don’t take our word for it: + Lockbook is 100% open-source. + ''; + homepage = "https://lockbook.net"; + license = lib.licenses.unlicense; + platforms = lib.platforms.linux; + changelog = "https://github.com/lockbook/lockbook/releases/tag/${version}"; + maintainers = [ lib.maintainers.parth ]; + }; +}