From 511d2a30dee6c779275f9132f292401515c9128f Mon Sep 17 00:00:00 2001 From: Chris Wells Date: Tue, 7 Oct 2025 14:48:27 -0500 Subject: Added update scripts --- pkgs/chef/default.nix | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'pkgs/chef/default.nix') diff --git a/pkgs/chef/default.nix b/pkgs/chef/default.nix index 2830cae..0cbbebb 100644 --- a/pkgs/chef/default.nix +++ b/pkgs/chef/default.nix @@ -1,4 +1,4 @@ -{ rustPlatform, fetchFromGitHub, lib, installShellFiles }: +{ rustPlatform, fetchFromGitHub, lib, installShellFiles, gitUpdater, serve ? true }: rustPlatform.buildRustPackage rec { pname = "cooklang-chef"; version = "0.10.1"; @@ -11,6 +11,9 @@ rustPlatform.buildRustPackage rec { cargoLock.lockFile = "${src}/Cargo.lock"; + # optionally disable the webserver + buildNoDefaultFeatures = !serve; + nativeBuildInputs = [ installShellFiles ]; @@ -20,20 +23,22 @@ rustPlatform.buildRustPackage rec { export XDG_CONFIG_HOME=$out/share for s in bash fish zsh; do - installShellCompletion --cmd ${meta.mainProgram} --$s <($out/bin/chef generate-completions $s) + installShellCompletion --cmd chef --$s <($out/bin/chef generate-completions $s) done ''; + passthru.updateScript = gitUpdater { rev-prefix = "v"; }; + meta = with lib; { homepage = "https://github.com/Zheoni/cooklang-chef"; description = "A CLI to manage cooklang recipes with extensions"; license = licenses.mit; mainProgram = "chef"; - maintainer = { + maintainers = [{ name = "Chris Wells"; github = "the-mathematicaster"; email = "chris@mathematicaster.org"; githubId = 99217745; - }; + }]; }; } -- cgit v1.2.3