nixpkgs/pkgs/by-name/lo/lockbook/package.nix
2024-11-29 11:39:12 -05:00

51 lines
1.6 KiB
Nix
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{
lib,
stdenv,
rustPlatform,
fetchFromGitHub,
installShellFiles,
}:
rustPlatform.buildRustPackage rec {
pname = "lockbook";
version = "0.9.15";
src = fetchFromGitHub {
owner = "lockbook";
repo = "lockbook";
rev = "refs/tags/${version}";
hash = "sha256-hqBjA/6MWlhVjV4m+cIcnoRTApHuzbPzivMsaQHfRcc=";
};
useFetchCargoVendor = true;
cargoHash = "sha256-+M+wL26KDbLKhcujPyWAsTlXwLrQVCUbTnnu/7sXul4=";
doCheck = false; # there are no cli tests
cargoBuildFlags = [
"--package"
"lockbook-cli"
];
nativeBuildInputs = [ installShellFiles ];
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
installShellCompletion --bash --name lockbook.bash <($out/bin/lockbook completions bash)
installShellCompletion --zsh --name _lockbook <($out/bin/lockbook completions zsh)
installShellCompletion --fish --name lockbook.fish <($out/bin/lockbook completions fish)
'';
meta = {
description = "Private, polished note-taking platform";
longDescription = ''
Write notes, sketch ideas, and store files in one secure place.
Share seamlessly, keep data synced, and access it on any
platformeven offline. Lockbook encrypts files so even we
cant see them, but dont take our word for it:
Lockbook is 100% open-source.
'';
homepage = "https://lockbook.net";
license = lib.licenses.unlicense;
platforms = lib.platforms.all;
changelog = "https://github.com/lockbook/lockbook/releases";
maintainers = [ lib.maintainers.parth ];
};
}