From db44bc8cd41dc1a14bc02469f09cfcd9a5cb3b15 Mon Sep 17 00:00:00 2001 From: parth Date: Tue, 14 Oct 2025 18:57:31 -0400 Subject: [PATCH] lockbook: add dep nfs-utils --- pkgs/by-name/lo/lockbook/package.nix | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/pkgs/by-name/lo/lockbook/package.nix b/pkgs/by-name/lo/lockbook/package.nix index b7a28602a8dc..60173444ec93 100644 --- a/pkgs/by-name/lo/lockbook/package.nix +++ b/pkgs/by-name/lo/lockbook/package.nix @@ -4,7 +4,12 @@ rustPlatform, fetchFromGitHub, installShellFiles, + nfs-utils ? null, # macOS doesn't need this + makeBinaryWrapper, }: +let + inherit (stdenv.hostPlatform) isLinux; +in rustPlatform.buildRustPackage rec { pname = "lockbook"; version = "25.10.13"; @@ -24,7 +29,16 @@ rustPlatform.buildRustPackage rec { "lockbook" ]; - nativeBuildInputs = [ installShellFiles ]; + nativeBuildInputs = [ + installShellFiles + ] + ++ lib.optionals isLinux [ makeBinaryWrapper ]; + + postFixup = lib.optionalString isLinux '' + wrapProgram $out/bin/lockbook \ + --prefix PATH : "${lib.makeBinPath [ nfs-utils ]}" + ''; + 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)