From b66fa26eaad3fcbf92af680b686f3d2680539128 Mon Sep 17 00:00:00 2001 From: Chris Wells Date: Sat, 22 Mar 2025 12:26:11 -0500 Subject: Adding to repo --- pkgs/chef/default.nix | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 pkgs/chef/default.nix (limited to 'pkgs/chef') diff --git a/pkgs/chef/default.nix b/pkgs/chef/default.nix new file mode 100644 index 0000000..cb8e72b --- /dev/null +++ b/pkgs/chef/default.nix @@ -0,0 +1,39 @@ +{ rustPlatform, fetchFromGitHub, lib, installShellFiles +, ... }: +let + pname = "cooklang-chef"; + version = "0.9.1"; + src = fetchFromGitHub { + owner = "Zheoni"; + repo = "cooklang-chef"; + rev = "v${version}"; + hash = "sha256-zst5dsRbSMP9b6XcWua3DFkQK9XjYytoxvbmhmkqTmk="; + }; +in rustPlatform.buildRustPackage { + inherit pname version src; + + cargoHash = "sha256-NH8LznrRHcv93wtI6i6kCLGmzGKnqsbQQN6UUTt42MQ="; + + nativeBuildInputs = [ + installShellFiles + ]; + + postInstall = '' + export XDG_CONFIG_HOME=$out/share + + for s in bash fish zsh; do + installShellCompletion --cmd chef --$s <($out/bin/chef generate-completions $s) + done + ''; + + # passthru = { + # inherit ui; + # }; + + meta = with lib; { + homepage = "https://github.com/Zheoni/cooklang-chef"; + description = "A CLI to manage cooklang recipes with extensions"; + license = licenses.mit; + mainProgram = "chef"; + }; +} -- cgit v1.2.3